What’s the main difference between ArrayList / HashMap and Vector / Hashtable?

Vector / HashTable are synchronized which means they are thread safe. Cost of thread safe is performance degradation. So if you are sure that you are not dealing with huge number of threads then you should use ArrayList / HashMap.But yes you can stillsynchronize List and Map’s using Collections provided methods :- List OurList = … Read more

Can you explain the core collection interfaces?

There are six interfaces and come under two different inheritance group one which comes under the collection interface root and the other in the map interface root.   Collection It’s the base of all collection classes. It provides a unified way to manipulate collection objects. Collection has group of object called as elements. These elements … Read more

How can you copy one array in to a different array?

System.arraycopy(myOldArray, 0, myNewArray, 0, length);+ In Java, you can copy one array into another using various methods. Here are a few common ways: Using a loop: You can iterate through each element of the source array and copy it to the corresponding position in the destination array. java // Example with int arrays int[] sourceArray … Read more

In which package is the applet class located?

Applet classes are located in ” java.applet “package. In Core Java, the Applet class is located in the java.applet package. The full name of the Applet class is java.applet.Applet. Applets are Java programs that are designed to be embedded within HTML pages and run on the client side, typically in a web browser.

What are applets ?

Applets are small applications that are accessed from web server automatically installed, and run from the browser. Once an applet arrives on the client it has limited access to resources thus ensuring security for the end user. An applet is controlled by the software that runs it. Usually, the underlying software is a browser, but … Read more