Java Core Basics – Detailed Guide
Introduction to Java
Java is a high-level, object-oriented, platform-independent programming language developed by
Sun Microsystems (now Oracle).
The principle of 'Write Once, Run Anywhere' (WORA) is achieved through the Java Virtual Machine
(JVM).
JDK, JRE, and JVM
JDK (Java Development Kit) provides tools to develop Java applications.
JRE (Java Runtime Environment) is required to run Java applications.
JVM executes Java bytecode and manages memory.
Data Types and Variables
Java has primitive data types such as int, float, double, char, boolean, etc.
Variables are containers used to store values during program execution.
Control Statements
Java supports if-else, switch, for, while, and do-while statements.
These statements control the flow of program execution.