What is the difference between JDK, JRE and JVM in Java?
The JVM runs Java bytecode, the JRE is the JVM plus the standard libraries needed to run Java programs, and the JDK is the JRE plus the development tools such as the compiler (javac).
Backend 路 Intern to senior
Java interviews are famous for going deep on the collections framework, the JVM and concurrency. Freshers are asked about OOP and core classes; mid-level candidates are asked how HashMap and the garbage collector work internally; senior candidates are asked to reason about thread safety, memory visibility and deadlocks.
4 of 12 questions match
Clear filtersThe JVM runs Java bytecode, the JRE is the JVM plus the standard libraries needed to run Java programs, and the JDK is the JRE plus the development tools such as the compiler (javac).
== compares primitives by value and objects by reference (whether they are the exact same object), while equals() compares the logical content of two objects when the class overrides it.
String is immutable, StringBuilder is a mutable and fast but not thread-safe buffer, and StringBuffer is a mutable buffer with synchronized methods that is thread-safe but slower.
final is a keyword that prevents reassigning a variable, overriding a method or extending a class; finally is a block that always runs after try/catch for cleanup; finalize() was a method called by the garbage collector and is now deprecated.