1. What is a Difference between JDK, JRE & JVM?
- JDK – Java Development Kit
- JRE – Java Runtime Environment
- JVM – Java Virtual Machine
2. What is Synchronization?
- Multiple Threads using the Same Object
3. Types of constructors in JAVA
4. Difference between Stack and Heap
5. Difference between StringBuffer and StringBuilder
- StringBuffer: (Java 1.0 & above)
- Thread Safety: Every method is synchronized so only one thread is allowed and the next thread has to wait.
- Performance: Not so Good performance.
- StringBuilder: (Java 1.5 & above)
- Thread Safety: Methods are not synchronized so multiple threads can be used.
- Performance: Compared to StringBuffer performance is high.
6. Access Modifiers:
- protected (through inheritance)
7. static variable and static method:
- static variable shared by all object instances