Java Programming – Valuable Exam Notes
1. Introduction to Java
• Java is a high-level, object-oriented programming language developed by Sun Microsystems.
• Java follows the principle: Write Once, Run Anywhere (WORA).
• Java programs are compiled into bytecode and executed by JVM.
2. Features of Java
• Platform Independent due to JVM.
• Object-Oriented approach improves code reusability.
• Robust and Secure with strong memory management.
• Automatic garbage collection.
3. Object-Oriented Concepts
• Encapsulation: Wrapping data and methods into a single unit.
• Inheritance: One class acquires properties of another class.
• Polymorphism: Same method name, different implementations.
• Abstraction: Showing essential features and hiding details.
4. Exception Handling
• Exception is an abnormal condition during program execution.
• Handled using try, catch, finally blocks.
• Helps maintain normal flow of program.
5. Multithreading
• Multithreading allows concurrent execution of two or more threads.
• Improves CPU utilization.
• Thread lifecycle: New, Runnable, Running, Waiting, Terminated.