End Term Examination Notes
Java & HTML – Complete Revision Guide (Units 1 to 5)
UNIT 1: Introduction to Object-Oriented
Paradigm
A. Programming Paradigms
1. Procedural Languages
Focus on functions and procedures.
Program divided into small procedures.
Data is exposed and globally accessible. Examples: C, Pascal.
2. Object-Based Languages
Supports objects but not full OOP features.
No inheritance or polymorphism. Examples: JavaScript (basic), VB.
3. Object-Oriented Languages
Program organized around objects.
Supports abstraction, encapsulation, inheritance, polymorphism.
Examples: Java, C++, Python.
Differences Between Paradigms
Procedural Object-Oriented
Function-based Object-based
Data and functions Data and methods
separate bound
Less secure More secure
Difficult maintenance Easy maintenance
Advantages of OOP
Code reusability
Modularity
Security
Easy maintenance
Real-world modeling
B. Features of OOP
1. Class
Blueprint of an object.
Defines properties and methods.
2. Object
Instance of a class.
Represents real-world entity.
3. Abstraction
Hiding internal details, showing only functionality.
Achieved using abstract classes and interfaces.
4. Encapsulation
Binding data and methods.
Achieved using access modifiers.
5. Data Hiding
Restricting direct access to data.
Using private keyword.
6. Inheritance
Acquiring properties of another class.
Improves code reusability.
7. Polymorphism
One method, many forms.
Method overloading & overriding.
C. Java Virtual Machine (JVM)
Bytecode
Intermediate code generated by Java compiler.
Platform independent.
JVM Architecture
Class Loader
Runtime Data Area
Execution Engine
Native Method Interface
Class Loader
Loads class files into memory.
Types: Bootstrap, Extension, Application
Execution Engine
Executes bytecode.
Includes Interpreter and JIT Compiler.
Garbage Collection
Automatically frees unused memory.
Prevents memory leaks.
UNIT 2: Introduction to Java with Class and
Object
A. Java Development Environment
JDK
Java Development Kit
Contains JRE, compiler, tools
IDE
Examples: Eclipse, IntelliJ, NetBeans Provides code editor, debugger,
compiler.
Setting Environment
Install JDK
Set PATH variable: bin folder of JDK
Set CLASSPATH for class files
B. Java Basics
Variables & Constants
Variables store data
Constants declared using final
Data Types
Primitive: int, float, char, boolean
Non-primitive: String, Array
Type Conversion
Implicit (Widening)
Explicit (Casting)
Operators
Arithmetic, Relational, Logical, Assignment
Control Statements
if, if-else, switch
for, while, do-while
Command Line Arguments
Passed through main(String[] args)
Keyboard Input
Using Scanner class
C. Classes and Objects
Methods
Define behavior of class
Constructors
Special method to initialize object
No return type
Constructor Overloading
Multiple constructors with different parameters
static Keyword
Belongs to class
Access Modifiers
public, private, protected, default
UNIT 3: Inheritance, Polymorphism, Interface,
Array & String
A. Inheritance
Types
Single
Multilevel
Hierarchical
Multiple Inheritance
Not supported by class
Achieved using interfaces
this & super
this: current object
super: parent class reference
Interface
Supports multiple inheritance
All methods are abstract
B. Polymorphism
Compile Time
Method Overloading
Runtime
Method Overriding
Overloading
Same method name
Different parameters
Overriding
Same method signature
Different implementation
C. Final, Abstract, Arrays, Strings
final
final class: cannot be inherited
final method: cannot be overridden
final variable: constant
Abstract Class
Contains abstract methods
Cannot be instantiated
Arrays
Collection of similar data
Fixed size
String Handling
String is immutable
StringBuffer mutable
UNIT 4: Exception and Multithreading
A. Exception Handling
Keywords
try
catch
throw
throws
finally
Purpose
Prevent abrupt termination
B. Types of Exceptions
Checked
Checked at compile time
Unchecked
Runtime exceptions
User-Defined Exception
Created by extending Exception class
C. Multithreading
Advantages
Faster execution
Efficient CPU usage
Issues
Deadlock
Race condition
Creating Thread
1. Extend Thread class
2. Implement Runnable interface
Thread Life Cycle
New
Runnable
Running
Blocked
Terminated
UNIT 5: HTML & Style Sheets
A. Forms & XHTML
Forms
Input elements: text, radio, checkbox
tag used
XHTML
Strict HTML
Case sensitive
Proper nesting required
B. Frames & Framesets
Frames
Divide browser window
Frameset
Replaced body tag
Defines layout
C. HTML5 Overview
Features
Semantic tags:
,
,
Audio & Video support
Canvas
Local Storage
Responsive design
QUICK REVISION POINTS
✅ OOP pillars: Abstraction, Encapsulation, Inheritance, Polymorphism ✅ JVM
converts bytecode to machine code ✅ Java is platform independent ✅
Interface supports multiple inheritance ✅ Throwable → Exception →
RuntimeException ✅ Thread start() invokes run() ✅ HTML5 reduces need for
external plugins
BULLET REVISION NOTES (Last-Minute Exam
Prep)
✅ UNIT 1: OOP & JVM
Programming Paradigms
Procedural → Functions & procedures
Object-Based → Objects without full OOP
Object-Oriented → Objects with all OOP features
OOP > Procedural: Secure, modular, reusable
OOP Features
Class → Blueprint
Object → Instance of class
Abstraction → Hide internal details
Encapsulation → Bind data + methods
Data Hiding → private keyword
Inheritance → Reusability
Polymorphism → One method, many forms
JVM
Bytecode → Platform independent
JVM Parts:
o Class Loader
o Runtime Data Area
o Execution Engine
o Garbage Collector
GC → Removes unused objects
✅ UNIT 2: Java Basics
Java Environment
JDK = JRE + tools
IDE: Eclipse, NetBeans, IntelliJ
PATH → JDK bin folder
CLASSPATH → Class file location
Core Concepts
Variables → Store data
Constants → final keyword
Data Types → Primitive & Non-primitive
Type Casting → Explicit / Implicit
Control Statements
Decision: if, switch
Loops: for, while, do-while
Input
Command line → args[]
Keyboard → Scanner class
OOP in Java
Constructor → Initializes object
Overloading → Multiple constructors
static → Class level
Access Modifiers → public, private, protected, default
✅ UNIT 3: OOP Advanced
Inheritance
Types:
o Single
o Multilevel
o Hierarchical
Multiple → Using Interface
this → Current object
super → Parent class
Polymorphism
Compile Time → Overloading
Run Time → Overriding
Keywords
final class → Cannot inherit
final method → Cannot override
final variable → Constant
Abstract & Interface
Abstract class → Has abstract methods
Interface → All methods abstract by default
Arrays & Strings
Array → Fixed size, same type
String → Immutable
StringBuffer → Mutable
✅ UNIT 4: Exception & Multithreading
Exception Handling
try → Code block
catch → Handles error
throw → Explicit exception
throws → Method declaration
finally → Always executes
Exception Types
Checked → Compile-time
Unchecked → Runtime
User-defined → Extends Exception
Multithreading
Advantages:
o Fast processing
o Better CPU utilization
Issues:
o Deadlock
o Race condition
Thread Creation
Extend Thread class
Implement Runnable
Thread Life Cycle
New → Runnable → Running → Blocked → Terminated
✅ UNIT 5: HTML & CSS
Forms
tag
Inputs: text, password, radio, checkbox
XHTML
Case-sensitive
Proper nesting
Strict syntax
Frames
Divide browser window
instead of
HTML5 Features
Semantic tags:
,
,
Audio / Video
Canvas
Local Storage
Responsive layout
🎯 QUICK EXAM POINTS - 4 pillars of OOP → A E I P - Java → Platform
independent - Multiple inheritance → Interface - start() → calls run() - String
immutable - HTML5 → No plugin required for media
Need more? - MCQs? - Important Questions? - Short Notes? - Diagrams?
Just ask!
==============================================
======
🧾 ULTRA-SHORT 1-PAGE CHEAT SHEET (END-
TERM QUICK LOOK)
🔹 UNIT 1 – OOP & JVM
Paradigms: Procedural (functions) | OOP (objects)
OOP Pillars: Abstraction, Encapsulation, Inheritance, Polymorphism
Class = Blueprint | Object = Instance
Encapsulation = Data + Methods
Data Hiding = private
Inheritance = Reusability
Polymorphism = Overloading + Overriding
Bytecode = Platform independent
JVM Parts: Class Loader → Execution Engine → Garbage Collector
🔹 UNIT 2 – Java Basics
JDK = JRE + Compiler + Tools
PATH → JDK/bin | CLASSPATH → class location
Data Types: int, float, char, boolean, String
final → Constant
Casting: Implicit / Explicit
Control: if, switch, for, while
Input: Scanner, args[]
Constructor → Initializes object
static → Class level
Access: public, private, protected
🔹 UNIT 3 – OOP Advanced
Inheritance: Single, Multilevel, Hierarchical
Multiple → Interface
this → current object | super → parent
Overloading → Compile-time
Overriding → Runtime
final class → no inheritance
Abstract class → cannot instantiate
Array → Fixed size
String → Immutable
🔹 UNIT 4 – Exception & Threads
try-catch-finally structure
throw → create exception
throws → declare exception
Checked → Compile-time
Unchecked → Runtime
Thread creation:
o Extends Thread
o Implements Runnable
Life Cycle: New → Runnable → Running → Blocked → Dead
🔹 UNIT 5 – HTML5
Forms: ,
,
XHTML: Case-sensitive, strict
Frames: Split browser window
HTML5 Features:
o Semantic tags
o Audio/Video
o Canvas
o Local Storage
o Responsive design
🎯 LAST-MINUTE KEYS - OOP = A E I P - Java = Write once, run anywhere -
start() calls run() - Interface supports multiple inheritance - String is
immutable - HTML5 removes plugin dependency
✅ Perfect for quick revision before exam!
==============================================
======
📘 DETAILED EXPLAINED NOTES (UNIT-WISE)
UNIT 1: INTRODUCTION TO OBJECT-ORIENTED
PARADIGM
==============================================
======
📘 PROPER NOTES: PROGRAMMING
PARADIGMS & OOP ADVANTAGES
1. Programming Paradigms
A programming paradigm is a style or method of programming that defines
how programs are structured and how solutions are developed.
There are three major paradigms in this syllabus: 1. Procedural Programming
2. Object-Based Programming 3. Object-Oriented Programming
1. Procedural Languages
Procedural programming focuses on procedures or functions that operate on
data. The program is broken into small functions and executed step-by-step.
Characteristics:
Emphasizes functions and procedures
Data is shared globally
Follows top-down approach
Logic is more important than data
Less security
Difficult to maintain large programs
Structure Example (Conceptual):
Main Program → Function 1 → Function 2 → Function 3
Advantages:
Simple and easy to understand
Faster execution for small programs
Disadvantages:
No data security
Poor code reusability
Difficult debugging in large systems
Examples:
C, BASIC, Pascal
2. Object-Based Languages
Object-based languages support the use of objects but do not support all
object-oriented features such as inheritance and polymorphism.
Characteristics:
Supports encapsulation and data hiding
Does not support inheritance
Does not support polymorphism
Limited reusability
Key Point:
These languages lie between procedural and object-oriented programming.
Examples:
JavaScript (basic form), Visual Basic
3. Object-Oriented Languages
Object-oriented programming (OOP) organizes the program around objects
instead of functions. Objects represent real-world entities.
Characteristics:
Combines data and functions
Supports all OOP principles
More secure and reliable
Follows bottom-up approach
Core Features:
Abstraction
Encapsulation
Inheritance
Polymorphism
Examples:
Java, C++, Python
✅ DIFFERENCE BETWEEN PROGRAMMING PARADIGMS
Procedur Object-
Feature al Object-Based Oriented
Basic Unit Function Object Object
Approach Top- Partial object Bottom-up
down approach
Data Low Medium High
Security
Inheritance ❌ No ❌ No ✅ Yes
Polymorphis ❌ No ❌ No ✅ Yes
m
Encapsulati ❌ No ✅ Yes ✅ Yes
on
Reusability Low Medium High
Maintainabil Difficult Moderate Easy
ity
✅ ADVANTAGES OF OBJECT-ORIENTED PROGRAMMING
(OOP)
1. Code Reusability
o Classes can be reused through inheritance.
2. Better Security
o Data hiding prevents unauthorized access.
3. Modularity
o Program divided into independent objects.
4. Easy Maintenance
o Errors can be fixed without affecting entire program.
5. Real-World Representation
o Objects represent real-life entities.
6. Scalability
o Easy to expand and enhance programs.
7. Reduced Complexity
o Problems divided into manageable objects.
8. Faster Development
o Reusable code saves development time.
🔑 EXAM SHORT POINTS
Procedural programming = Function-based
Object-based = Supports objects but not full OOP
OOP = Object-centered programming
OOP focuses on “data + behavior”
OOP improves security, reusability, and scalability
==============================================
======
A. Programming Paradigms
1. Procedural Languages
These languages focus on procedures or functions. The program is divided
into small blocks of functions that operate on data. - Follows step-by-step
execution - Data is separate from functions - Less secure due to global data
access Examples: C, Pascal
2. Object-Based Languages
Supports objects but does not support full OOP features
No inheritance or polymorphism Examples: Basic JavaScript, VB
3. Object-Oriented Languages
Program organized around objects
Combines data and methods
Supports all OOP features Examples: Java, C++, Python
Difference Between Paradigms
Procedural focuses on “how to do” while OOP focuses on “what to do”. OOP
offers better security, reusability, and modularity.
Advantages of OOP
Code Reusability
Modularity
Easy Maintenance
Improved Security
Real-world representation
B. OOP Features
Abstraction
Hiding unnecessary details and showing only essential features. Example:
Using ATM without knowing its internal working.
Class
Blueprint that defines properties and methods.
Object
Instance of class created in memory.
Encapsulation
Binding data and methods into a single unit (class). Achieved using access
modifiers.
Data Hiding
Restricting access using private keyword.
Inheritance
Process where one class acquires properties of another. Improves reusability.
Polymorphism
Same method behaving differently. - Overloading - Overriding
C. JVM & Bytecode
Bytecode
Intermediate code generated by Java compiler, executed by JVM.
JVM Architecture
Class Loader
Method Area
Heap
Stack
Execution Engine
Class Loader
Loads .class files into memory. Types: Bootstrap, Extension, Application
Execution Engine
Reads bytecode and converts to machine code. Includes Interpreter and JIT
Compiler.
Garbage Collection
Automatically deletes unused objects to free memory.
==============================================
======
UNIT 2: INTRODUCTION TO JAVA WITH CLASS
AND OBJECT
A. Java Environment
JDK
Java Development Kit = JRE + development tools (javac, java, debugger)
IDE
Software to write and run Java programs. Examples: Eclipse, IntelliJ,
NetBeans
Setting Environment
1. Install JDK
2. Set PATH → JDK/bin
3. Set CLASSPATH → location of class files
B. Java Language Basics
Variables & Constants
Variable: Stores data Constant: final keyword
Data Types
Primitive: int, float, char, boolean Non-Primitive: String, Array
Type Conversion
Widening (automatic)
Narrowing (explicit casting)
Operators
Arithmetic (+ - * / %) Relational (>, <, ==) Logical (&&, ||, !)
Decision Making
if, if-else, switch
Loops
for, while, do-while
Input
Command Line → args[] Keyboard → Scanner class
C. Classes & Objects
Methods
Functions inside class
Constructors
Special method to initialize object - Same name as class - No return type
Constructor Overloading
Multiple constructors with different parameters
static Keyword
Belongs to class, not to object
Access Control
public, private, protected, default
==============================================
======
UNIT 3: INHERITANCE, POLYMORPHISM,
INTERFACE, ARRAY & STRING
A. Inheritance
Types
Single
Multilevel
Hierarchical
Multiple Inheritance
Not supported by classes but achieved using interfaces.
this & super
this → current object reference super → parent class reference
Interface
Collection of abstract methods Supports multiple inheritance
B. Polymorphism
Compile Time
Method Overloading
Run Time
Method Overriding
Overriding requires: - Same method signature - IS-A relationship
C. Final, Abstract, Arrays, Strings
final Keyword
final class → cannot be inherited final method → cannot override final
variable → constant
Abstract Class
Contains abstract methods Cannot create object
Arrays
Fixed size, homogeneous elements
Strings
String → Immutable StringBuffer → Mutable
==============================================
======
UNIT 4: EXCEPTION HANDLING &
MULTITHREADING
A. Exception Handling
Used to prevent abnormal program termination.
Keywords: - try → risky code - catch → handles error - throw → creates
exception manually - throws → passes exception - finally → always executes
B. Exception Types
Checked: Compile time (IOException) Unchecked: Runtime
(ArithmeticException) User-defined: Created by extending Exception
C. Multithreading
Advantages
Faster execution
Better CPU utilization
Issues
Deadlock
Starvation
Creating Threads
1. Extending Thread class
2. Implementing Runnable interface
Thread Life Cycle
New → Runnable → Running → Blocked → Terminated
==============================================
======
UNIT 5: HTML & STYLE SHEETS
A. Forms
Used to collect user input
tag Input types: text, radio, checkbox, password
XHTML
Stricter version of HTML - Proper nesting - Lowercase tags - Case-sensitive
B. Frames & Framesets
Frames divide browser into sections
replaces
Describe the architecture of the Java Virtual Machine (JVM) in detail. Explain
the responsibilities of each major component—Class Loader subsystem,
Runtime Data Areas, Execution Engine, Native Interface, and Garbage
Collector. Include a neat diagram of the JVM architecture.
Explain the process of class loading in Java, starting from loading the .class
file to link and initialization phases. Discuss how the Execution Engine
executes bytecode and how automatic memory management is handled
through Java’s Garbage Collection mechanism. What are the advantages of
having managed memory in Java?
Explain constants, variables, and data types in Java with suitable examples.
Discuss the significance of variable declaration, scope, and lifetime. How are
constants defined in Java, and why are they important in programming?
What are operators in Java? Explain the different categories of operators
such as arithmetic, relational, logical, assignment, unary, and ternary
operators.
Explain decision-making and branching statements in Java, including if, if-
else, nested if, switch, and conditional (?:) operator.
the different looping constructs in Java—while, do-while, and for loops.
Explain loop control statements such as break, continue
Explain the concept of classes and objects in Java.
Describe methods in Java in detail.
Explain method declaration, method calling, return types, and parameter
passing (call-by-value).
What are constructors in Java?
working of default, no-argument, and parameterized constructors with
suitable examples.
Define constructor overloading. Explain how Java differentiates between
overloaded constructors using parameters.
Explain the use of the static keyword in Java.
describe Java’s access control mechanisms (public, private, protected, and
default)
Explain the different types of inheritance supported in Java:
Explain the use of the this keyword in Java.
Explain the role of the super keyword in inheritance.
: What is an interface in Java? Explain how to declare, implement, and
extend interfaces.
Define polymorphism in Java. Explain how polymorphism supports flexibility
and extensibility in object-oriented programming. Discuss the importance of
dynamic behavior in large applications with suitable examples.
What is compile-time polymorphism?
Explain run-time polymorphism in Java
What is method overriding?
Explain the rules for overriding methods in Java, such as inheritance, access
modifiers, return types, annotations, and exceptions.
Explain the concept of exception handling in Java.
Describe the working of the try and catch blocks in Java.
What is the purpose of the throw keyword in Java?
Write a detailed note on Java’s exception-handling mechanism, explaining
the five key keywords: try, catch, throw, throws, and finally.
Checked and Unchecked exceptions, User define exception,
Explain the concept of multithreading in Java. How does it differ from
multiprocessing?
Describe the advantages of multithreading in Java, such as improved
performance, efficient CPU utilization, and enhanced user experience.
Explain the process of creating threads in Java using the Thread
Explain the complete thread life cycle in Java with a neat diagram.
Explain the structure and components of HTML forms. Discuss different types
of form controls such as text fields, radio buttons, checkboxes, dropdown
lists, and buttons.