JAVA PROGRAMMING NOTES
Introduction to Java
Java is a high-level, object-oriented programming language developed by Sun Microsystems.
Java follows the principle of Write Once Run Anywhere (WORA).
Java programs run on JVM which makes Java platform independent.
Features of Java
Object-Oriented
Platform Independent
Secure and Robust
Multithreaded
Distributed
OOP Concepts
Class and Object form the base of Java.
Inheritance allows code reuse.
Polymorphism allows one interface many forms.
Encapsulation provides data security.
Abstraction hides implementation details.
Exception Handling
Exceptions are runtime errors.
Handled using try, catch, finally, throw, throws.
Multithreading
Thread is a lightweight process.
Java supports multithreading using Thread class and Runnable interface.