Java Complete Syllabus Pack 1. UNIT-WISE NOTES (POINT-WISE) Unit 1: Introduction 1.
Java is
object-oriented and platform-independent.
2. JVM executes bytecode for portability.
3. Uses automatic memory management.
4. Rich standard libraries via Java API.
Unit 2: Classes and Objects 1. Class = blueprint containing variables & methods.
2. Object = instance created using new.
3. Supports encapsulation with private members.
4. Constructor initializes object data.
Unit 3: Methods 1. Methods define object behavior.
2. Can return values or be void.
3. Support overloading.
4. Use parameters for input.
Unit 4: Memory Concepts 1. Stack stores method calls & local variables.
2. Heap stores objects created using new.
3. Method area stores class-level data.
4. Garbage Collector cleans unused objects.
Unit 5: Arrays & Control Statements 1. Arrays store same-type values in sequence.
2. Control flow uses if, switch, loops.
3. for, while, do-while used for repetition.
4. break, continue used for jumps.
2. 2-MARK ANSWERS 1. What is JVM?
A machine that executes Java bytecode.
2. Define variable.
A storage location identified by name.
3. What is an object?
A runtime instance of a class.
4. Define constructor.
Special method for object initialization.
5. What is an array?
A collection of similar elements.
3. 4-MARK ANSWERS (POINT-WISE) Explain encapsulation.
1. Protects data inside a class.
2. Uses private variables.
3. Accessed via getters & setters.
4. Prevents unauthorized data access.
Explain constructor types.
1. Default constructor: no parameters.
2. Parameterized: accepts input values.
3. Copy constructor: manually created.
4. Used to initialize objects.
Explain arrays.
1. Fixed-size sequential data structure.
2. Stores same data-type values.
3. Access via index starting 0.
4. Created using new keyword.
4. 8-MARK ANSWERS Explain OOP Concepts.
1. Encapsulation: hides data.
2. Inheritance: reuses code.
3. Polymorphism: method variation.
4. Abstraction: hides complexity.
5. Objects represent real-world entities.
6. Classes structure code modules.
7. OOP improves maintainability.
8. Enhances security and readability.
Explain Java Memory Model.
1. Stack stores method frames.
2. Heap stores objects.
3. Method area holds class-level metadata.
4. PC registers track instruction execution.
5. Native stack executes non-Java code.
6. GC removes unused objects.
7. Prevents memory leaks.
8. Ensures efficient resource usage.
5. MCQs WITH ANSWERS 1. Which is not a primitive type?
A) int B) float C) String D) char
Answer: C
2. Arrays index starts from?
A) 1 B) 0 C) -1 D) None
Answer: B
3. new keyword is used to?
A) destroy objects B) create objects C) call methods D) none
Answer: B