What is multithreading?
Multithreading is the mechanism in which more than one thread run independent of each other within the process.
What is the difference between process and thread?
Process is a program in execution whereas thread is a separate path of execution in a program.
What is the difference between Array and vector?
Array is a set of related data type and static whereas vector is a growable array of objects and dynamic.
What is the difference between String and String Buffer?
String objects are constants and immutable whereas StringBuffer objects are not.
b) String class supports constant strings whereas StringBuffer class supports growable and modifiable strings.
What are inner class and anonymous class?
Inner class : classes defined in other classes, including those defined in methods are called inner classes. An inner class can have any accessibility including private. Anonymous class : Anonymous class is a class defined inside a method without a name and is instantiated and declared in the same place and cannot have explicit constructors.
Can you have an inner class inside a method and what variables can you access?
Yes, we can have an inner class inside a method and final variables can be accessed.