Java Exam Handwritten Style Notes
These notes contain all important Java concepts discussed in the conversation. They are
useful for BCA/CCSU exam preparation.
1. Java as OOP Language
Java is an object-oriented programming language that uses classes and objects. It supports
encapsulation, inheritance, polymorphism and abstraction.
2. Features of Java
Platform independent, secure, robust, object-oriented, multithreaded, distributed, portable and
dynamic.
3. Access Specifiers
public, private, protected and default are used to control accessibility.
4. Main Method
public static void main(String args[]) is the entry point of Java program.
5. final, this and super
final prevents modification. this refers current object. super refers parent class object.
6. int vs Integer
int is primitive datatype while Integer is wrapper class.
7. Garbage Collection
Garbage collector removes unused objects automatically from memory.
8. Constructor
Constructor initializes object. Types: default and parameterized constructor.
9. Inheritance
Inheritance allows one class to acquire properties of another class.
10. Method Overloading
Same method name with different parameters.
11. Method Overriding
Child class provides specific implementation of parent method.
12. Abstract Class
Abstract class cannot be instantiated and may contain abstract methods.
13. Interface
Interface contains abstract methods and supports multiple inheritance.
14. Exception Handling
Uses try, catch, finally, throw and throws to handle runtime errors.
15. Checked vs Unchecked Exception
Checked exceptions are checked at compile time while unchecked exceptions occur at
runtime.
16. User Defined Exception
Custom exception created by programmer by extending Exception class.
17. Thread Life Cycle
New, Runnable, Running, Waiting, Blocked and Dead states.
18. Synchronization
Synchronization prevents multiple threads from accessing shared resources simultaneously.
19. Thread vs Runnable
Thread class uses inheritance while Runnable interface provides flexibility.
20. String vs StringBuffer
String is immutable while StringBuffer is mutable.
21. JVM JRE JDK
JVM executes bytecode, JRE provides runtime environment and JDK provides development
tools.
22. Arrays in Java
Array stores multiple values of same datatype in contiguous memory.