Here are top selected core java interview questions asked in high level interviews, these questions may be helpful for both freshers or experienced professional going for interview.
1. Class(Method) Area
2. Heap
3. Stack
4. Program Counter Register
5. Native Method Stack
71) What are immutable objects in Java?
In java, immutable objects are the objects which can not be changed once created. Any change to the states of these object results in a new object. String objects are the example of immutable objects in java any change to the states of an String object results in a new object and the old object remains unchanged.72) What is the difference between a StringBuffer and StringBuilder class in Java?
In java both StringBuffer and StringBuilder classes are non immutable in nature, the only difference in between them is that StringBuffer class in thread-safe while StringBuilder is not thread safe in nature. StringBuilder class was introduced in Java5 to reduce the overhead of synchronization.73) How many types of memory areas are allocated by JVM?
JVM allocated memory areas in many forms like:1. Class(Method) Area
2. Heap
3. Stack
4. Program Counter Register
5. Native Method Stack