BTECH – CORE JAVA HANDWRITTEN NOTES
(Exam Oriented | Concept Focused)
---------------------------------
1. INTRODUCTION TO JAVA
---------------------------------
Java is a high-level, object-oriented, platform-independent programming language.
Developed by James Gosling in 1995.
Java follows WORA principle – Write Once, Run Anywhere.
---------------------------------
2. FEATURES OF JAVA
---------------------------------
• Simple
• Object Oriented
• Platform Independent
• Secure
• Robust
• Portable
• Multithreaded
---------------------------------
3. JAVA ARCHITECTURE
---------------------------------
Source Code (.java)
↓ Compiler
Bytecode (.class)
↓ JVM
Machine Code
JVM – Executes bytecode
JRE – JVM + Libraries
JDK – JRE + Compiler + Tools
---------------------------------
4. BASIC JAVA PROGRAM
---------------------------------
class Test {
public static void main(String args[]) {
[Link]("Hello Java");
---------------------------------
5. VARIABLES
---------------------------------
Local Variable – inside method
Instance Variable – inside class
Static Variable – shared by all objects
---------------------------------
6. DATA TYPES
---------------------------------
Primitive:
byte, short, int, long, float, double, char, boolean
---------------------------------
7. OPERATORS
---------------------------------
Arithmetic, Relational, Logical, Assignment, Unary
---------------------------------
8. CONTROL STATEMENTS
---------------------------------
if, if-else, switch
---------------------------------
9. LOOPS
---------------------------------
for loop
while loop
do-while loop
---------------------------------
10. OOPS CONCEPTS
---------------------------------
Class – Blueprint
Object – Instance of class
Encapsulation – Data hiding using private
Inheritance – extends keyword
Polymorphism – Overloading & Overriding
Abstraction – Abstract class & Interface
---------------------------------
11. CONSTRUCTORS
---------------------------------
Same name as class
No return type
Types: Default, Parameterized
---------------------------------
12. THIS KEYWORD
---------------------------------
Refers current object
---------------------------------
13. STATIC KEYWORD
---------------------------------
Belongs to class
No object required
---------------------------------
14. FINAL KEYWORD
---------------------------------
final variable – cannot change
final method – cannot override
final class – cannot inherit
---------------------------------
15. EXCEPTION HANDLING
---------------------------------
try
catch
finally
Checked and Unchecked Exceptions
---------------------------------
16. MULTITHREADING
---------------------------------
Thread class
Runnable interface
Used for multitasking
---------------------------------
17. COLLECTION FRAMEWORK
---------------------------------
List – ArrayList
Set – HashSet
Map – HashMap
---------------------------------
18. FILE HANDLING (INTRO)
---------------------------------
File class
FileReader, FileWriter
---------------------------------
END OF NOTES
---------------------------------