Java is a high-level, class-based, object-oriented programming language designed to have as few implementation dependencies as possible.
Key features include platform independence, object-oriented, robust, secure, multithreaded, and high performance.
JVM (Java Virtual Machine) is an abstract machine that enables your computer to run Java programs by converting bytecode into machine code.
JDK (Java Development Kit) contains tools for Java programming including the compiler; JRE (Java Runtime Environment) is used to run Java programs and contains JVM.
Wrapper classes provide a way to use primitive data types (int, boolean, etc.) as objects. Examples include Integer, Boolean, Double.
Inheritance allows a class to acquire properties and methods of another class, promoting code reusability.
Polymorphism allows methods to do different things based on the object it is acting upon, mainly through method overloading and overriding.
Abstraction hides complex implementation details and shows only essential features of an object.
An interface is a reference type in Java, similar to a class, that can contain only constants, method signatures, default methods, static methods, and nested types.
Abstract classes can have method implementations and state; interfaces cannot (before Java 8). A class can implement multiple interfaces but can extend only one class.
A constructor is a block of code used to initialize an object. It has the same name as the class and no return type.
Overloading: Same method name with different parameters. Overriding: Subclass provides a specific implementation of a method in superclass.
The final keyword is used to restrict the user. It can be applied to variables, methods, and classes.
Exceptions are problems that arise during the execution of a program. Java provides a mechanism to handle runtime errors using try-catch blocks.
Multithreading is a process of executing multiple threads simultaneously to maximize CPU utilization.
Checked exceptions are checked at compile-time while unchecked exceptions occur at runtime.
A package is a namespace that organizes classes and interfaces to avoid naming conflicts.
Garbage collection is the process by which Java programs perform automatic memory management by deleting objects that are no longer used.
== checks if two references point to the same object; equals() checks if two objects are logically equal.
The static keyword indicates that a member belongs to the class rather than instances of the class.