📌 What is Java?
Java is a high-level, object-oriented, platform-independent programming language. It follows the principle:
"Write Once, Run Anywhere" (WORA) — because Java code runs on the Java Virtual Machine (JVM).
Concept | Example or Description |
---|---|
Class & Object | Blueprint & real-world entity |
Data Types | int, float, double, char, boolean |
Variables | int x = 10; String name = "Shankara"; |
Operators | +, -, *, /, ==, !=, etc. |
Control Flow | if, else, switch, for, while, do-while |
Methods | Functions in Java: void greet() { ... } |
Constructors | Special method to initialize objects |