0% found this document useful (0 votes)
6 views1 page

Java Fundamentals One Page

The document provides an overview of Java fundamentals, including the roles of JVM, JDK, and JRE in executing Java bytecode. It covers key Object-Oriented Programming concepts such as encapsulation, inheritance, abstraction, and polymorphism, as well as important details about Strings, equals/hashCode contracts, and exception handling. Additionally, it highlights modern Java features like records, sealed classes, and lambda expressions.

Uploaded by

Tanuj Sharma
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Java Fundamentals One Page

The document provides an overview of Java fundamentals, including the roles of JVM, JDK, and JRE in executing Java bytecode. It covers key Object-Oriented Programming concepts such as encapsulation, inheritance, abstraction, and polymorphism, as well as important details about Strings, equals/hashCode contracts, and exception handling. Additionally, it highlights modern Java features like records, sealed classes, and lambda expressions.

Uploaded by

Tanuj Sharma
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java Fundamentals

Java With DSA — One-Page Study Document

JVM
Java source is compiled to bytecode and executed by the JVM. The JVM manages memory, class loading, runtime execution and JIT
compilation.

JDK / JRE / JVM


JDK provides development tools and the Java runtime. JVM executes bytecode. Modern Java distributions generally package the
runtime with the JDK.

OOP
Encapsulation protects state; inheritance enables reuse; abstraction exposes essential behavior; polymorphism allows one interface to
represent different implementations.

String
String is immutable. Use StringBuilder for repeated modifications. == compares references, while equals() compares logical equality.

equals() / hashCode()
If two objects are equal according to equals(), they must return the same hashCode(). This contract is critical for HashMap and
HashSet.

Exceptions
Checked exceptions are compiler-enforced. RuntimeException subclasses are unchecked. Use try-with-resources for AutoCloseable
resources.

Modern Java
Know records, sealed classes, switch expressions, lambdas, streams, Optional, pattern matching and basic virtual-thread concepts.

You might also like