0% found this document useful (0 votes)
5 views2 pages

Java Day1 Revision Notes

Java is a high-level, object-oriented programming language that operates on the principle of 'Write Once, Run Anywhere' through the use of JVM. The JDK is a comprehensive toolkit for developers that includes the JRE and JVM, while the JRE provides the necessary environment to run Java programs. Key concepts include variables, data types, and various operators used in Java programming.

Uploaded by

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

Java Day1 Revision Notes

Java is a high-level, object-oriented programming language that operates on the principle of 'Write Once, Run Anywhere' through the use of JVM. The JDK is a comprehensive toolkit for developers that includes the JRE and JVM, while the JRE provides the necessary environment to run Java programs. Key concepts include variables, data types, and various operators used in Java programming.

Uploaded by

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

Day 1 – Java Quick Revision Notes

🔥 What is Java?
Java is a high-level, object-oriented, case-sensitive programming language. It follows “Write
Once, Run Anywhere”.
Java code → compiled to bytecode → runs on any device using JVM.

JDK (Java Development Kit)


• Full toolkit for developers.
• Contains JRE + JVM + compiler (javac) + debugger.
• You write code → JDK compiles it → produces bytecode (.class).

🧠 JVM (Java Virtual Machine)


• Executes bytecode.
• Makes Java platform-independent.
• Converts bytecode → machine code for your system.

📦 JRE (Java Runtime Environment)


• Contains JVM + libraries.
• Needed to run Java programs.

⚡ Quick Difference
JVM = Runner
JRE = Runner + Environment
JDK = Full toolkit for developers

🔤 Variables
Example: int a = 5;
• int → data type
• a → variable
• 5 → literal
Variables store values in memory. Can use _, $. No spaces or keywords allowed.

📘 Data Types (Whole Numbers)


byte – 1 byte (8 bits)
short – 2 bytes
int – 4 bytes
long – 8 bytes
➕ Operators in Java
1. Arithmetic: +, -, *, /, %
2. Assignment: =, +=, -=, *=, /=, %=
3. Comparison: ==, !=, >, <, >=, <=
4. Logical: &&, ||, !
5. Increment/Decrement: ++, --
6. Bitwise: &, |, ^, ~, <<, >>, >>>

📚 Perfect One-Day-Before-Exam Summary


✔ Java runs everywhere using JVM.
✔ JDK = Write & Compile, JRE = Run, JVM = Execute.
✔ Variables store values. int a = 5;
✔ Four main integer types: byte, short, int, long.
✔ Operators: Arithmetic, Assignment, Comparison, Logical.

You might also like