Java Interview Questions
Java Interview Questions
1.What is JVM?
The Java interpreter along with the runtime environment required to run the Java application in called
as Java virtual machine(JVM)
17. What is a layout manager and what are different types of layout managers available in
java AWT?
A layout manager is an object that is used to organize components in a container. The different
layouts are available are FlowLayout, BorderLayout, CardLayout, GridLayout and GridBagLayout
37. What is the difference between preemptive scheduling and time slicing?
Under preemptive scheduling, the highest priority task executes until it enters the waiting or dead
states or a higher priority task comes into existence. Under time slicing, a task executes for a
predefined slice of time and then reenters the pool of ready tasks. The scheduler then determines
which task should execute next, based on priority and other factors.
50. What is the difference between the prefix and postfix forms of the ++ operator?
The prefix form performs the increment operation and returns the value of the increment operation.
The postfix form returns the current value all of the expression and then performs the increment
operation on that value.
52. What will happen to the Exception object after exception handling?
Exception object will be garbage collected.
64. How many objects are created in the following piece of code?
MyClass c1, c2, c3;
c1 = new MyClass ();
65.What is UNICODE?
Unicode is used for internal representation of characters and strings and it uses 16 bits to represent
each other.