The main difference between Array list and vector are given below-
Array List is fast, non-synchronized, and increases its Array size by 50% if an element is inserted in it. Increment size is not defined by the Array List. However, it can only use the Iterator for traversing an Array List.
Vector is slow, synchronized, and doubled the size of its array by default. Moreover, it defines the increment size and uses both Enumeration and Iterator for traversing. Vector is a thread-safe.
Pointers are not used on the Java platform. This is due to the fact that pointers are unsafe. Moreover, they enhance the complexity of the program. Java is a simplified coding language, and pointers will enhance complexity. Thus, contradicting the concept. You may be familiar that JVM is responsible for memory allocation in Java. Therefore, if pointers are used, it may lead to direct access to memory.
JIT is the abbreviation of the Just-In-Time compiler in Java. JIT compiler is for Java application's performance optimization at the run time. This program plays an important role in the conversion of Java bytecode into instructions. These instructions are further supplied to the processor.
Once the method got compiled, compiled code was introduced directly by JVM.
Classloader is nothing but a subsystem of JVM. It is meant to load class files. Do you know a java program is first run by classloader?
The three types of classloaders in Java are:
The variables can be defined as static if they are shared among all the objects of the class. You should understand that the static subdivision of class and it has no relation with the object. Therefore, there is no need to create an object for accessing these kinds of variables. So whenever variables or methods have to be defined, static is used. Additionally, these methods or variables should be common to all objects of the class.
A good illustration of this is supposed there is a class that simulates student collection in that college. In this case, the college name is a common attribute of students. Hence the college name is known as static.
|