Skip to content
Computer ApplicationsICSE Class 10 · Chapter 1

Introduction to Object Oriented Programming Concepts ICSE Class 10

Updated 14 October 2026 · Fact-checked

Object oriented programming organises a program around objects that combine data and the methods that act on it. Its four principles are data abstraction, encapsulation, inheritance and polymorphism. In Java, source code (.java) is compiled by javac into bytecode (.class), which the Java Virtual Machine runs on any platform. ICSE Class 10 revises all of this.

What Introduction to Object Oriented Programming Concepts is about

This Class IX chapter is part of the Class X board syllabus as revision, and it supplies many 1-mark MCQs: the extension of a Java source file (2024), what the JVM does, which principle a real-life example shows.

The syllabus asks for: the principles of object oriented programming and the difference between procedure oriented and object oriented programming; all four principles (data abstraction, inheritance, polymorphism, encapsulation) defined and explained with real-life examples; types of Java programs (applets and applications); the Java compilation process; source code, bytecode, object code and the JVM; and the features of Java (simple, robust, secure, object oriented, platform independent and so on). Learn crisp definitions and one real-life example for each principle.

Weightage: CISCE publishes no chapter weightage. Section A (40 marks) is compulsory: 1-mark MCQs and 2-mark short answers including output and error questions; in Section B you answer any four of six 15-mark programming questions written in Java.Source: CISCE ICSE Computer Applications (661) specimen paper structure for 2027

Key concepts

Procedure oriented vs object oriented programming

Procedure oriented programming (POP), as in C or BASIC, divides a program into functions (procedures) that act on data. Data usually moves freely between functions, often as global data, so any function can change it.

Object oriented programming (OOP), as in Java, divides a program into objects. Each object bundles its data (attributes) with the methods that work on that data, and other objects can use the data only through those methods.

Differences: (1) Unit: functions vs objects. (2) Focus: steps (algorithm) vs data. (3) Data security: data is exposed vs data is hidden (encapsulation). (4) Approach: top-down vs bottom-up. (5) Reuse: limited vs easy through inheritance. (6) Real-world modelling: weak vs strong. (7) Adding new data and functions: difficult vs easy.

Worked example

(2 marks) State two differences between procedure oriented and object oriented programming.

Try it first, then show the solutionSolution
  1. POP divides a program into functions; OOP divides it into objects - 1 mark.
  2. In POP data moves freely and is less secure; in OOP data is hidden inside objects and accessed through methods - 1 mark.

Answer: (1) Procedure oriented programming is built around functions, whereas object oriented programming is built around objects. (2) In POP data moves freely between functions and can be changed by any of them, whereas in OOP data is hidden inside objects and is accessed only through their methods.

The four principles of OOP

Data abstraction: showing only the essential features of something and hiding the background details. Example: you drive a car with the steering wheel, accelerator and brake without knowing how the engine works; you use System.out.println() without knowing how it writes to the screen.

Encapsulation: wrapping data and the methods that operate on it into a single unit (a class), and restricting direct access to the data. Example: a medicine capsule wraps the medicine inside; an ATM lets you reach your account only through its menu, not directly.

Inheritance: the process by which one class (the subclass or derived class) acquires the properties and methods of another (the superclass or base class), so code can be reused and extended. Example: a child inherits features from parents; a 'Car' class inherits from a 'Vehicle' class.

Polymorphism: the ability of one thing to take many forms: the same name or message behaves differently in different situations. Example: a person behaves as a student in school, a customer in a shop and a son at home; in Java, overloaded methods with the same name do different jobs depending on the arguments.

Worked example

(2 marks) Define polymorphism and give a real-life example.

Try it first, then show the solutionSolution
  1. Polymorphism: the ability of one entity (a name or message) to take many forms - 1 mark.
  2. Example: a person acts as a student, a customer and a son in different situations - 1 mark.

Answer: Polymorphism is the ability of the same entity, such as a method name, to behave in different forms in different situations; for example, the same person behaves as a student at school, a customer in a shop and a son at home.

Java applets and applications

Java programs are of two types:
(1) Java application (stand-alone program): a program that runs on its own on a computer through the JVM, like any other program. It starts from the main() method. Example: a program that calculates a bill and prints it, written in BlueJ.
(2) Java applet: a small Java program designed to be embedded in a web page and run inside a Java-enabled web browser (or applet viewer); it has no main() method. Example: an animated clock or small game on a web page (applets are now rarely used, but they are in the syllabus).

Worked example

(2 marks) Distinguish between a Java application and a Java applet.

Try it first, then show the solutionSolution
  1. Application: stand-alone program that runs on the computer through the JVM, starting from main() - 1 mark.
  2. Applet: small program embedded in a web page, run in a browser; no main() - 1 mark.

Answer: A Java application is a stand-alone program that runs directly on a computer through the JVM, starting from the main() method, whereas a Java applet is a small program embedded in a web page that runs inside a Java-enabled browser and has no main() method.

Compilation process: source code, bytecode, object code, JVM

Source code: the program written by the programmer in Java, saved in a file with the extension .java (for example, Bill.java).

Compilation: the Java compiler (javac) checks the source code for syntax errors and translates it into bytecode, stored in a file with the extension .class (Bill.class).

Bytecode: an intermediate, platform-independent code produced by the Java compiler; it is not the machine code of any particular computer.

Java Virtual Machine (JVM): the software (a Java interpreter) that runs bytecode. It translates bytecode into the machine (object) code of the computer it runs on, line by line or with a just-in-time (JIT) compiler. There is a JVM for each operating system.

Object code (machine code): the binary code that the computer's processor actually executes.

Steps: write source code (.java) → compile with javac → bytecode (.class) → JVM interprets bytecode → machine code runs → output.

Because bytecode is the same on every platform and only the JVM differs, Java is 'write once, run anywhere' (platform independent).

Worked example

(2 marks) What is bytecode? Why is it important?

Try it first, then show the solutionSolution
  1. Bytecode is the intermediate code produced by the Java compiler from source code, stored in a .class file - 1 mark.
  2. It can run on any machine that has a JVM, making Java platform independent - 1 mark.

Answer: Bytecode is the intermediate, machine-independent code produced when the Java compiler compiles source code; it is stored in a .class file and can be run by the JVM on any platform, which makes Java platform independent.

Features of Java

(1) Simple: syntax similar to C and C++ but without confusing features such as pointers; automatic memory management (garbage collection).
(2) Object oriented: everything is organised in classes and objects.
(3) Platform independent (portable): bytecode runs on any machine with a JVM.
(4) Robust: strong type checking, exception handling and garbage collection make programs reliable.
(5) Secure: programs run inside the JVM, which checks bytecode and restricts access to the system; no pointers.
(6) Compiled and interpreted: compiled to bytecode, then interpreted by the JVM.
(7) Multithreaded: can perform several tasks at once.
(8) Case sensitive: Sum and sum are different identifiers.
(9) Distributed and dynamic: supports network programming and loads classes as needed.

Worked example

(1 mark) The extension of a Java source code file is:
(a) .exe
(b) .class
(c) .java
(d) .jvm

Try it first, then show the solutionSolution
  1. Source code is saved as .java; bytecode is .class.

Answer: (c) .java

A first Java program in BlueJ

Every Java application is a class. The main() method is where execution starts. In BlueJ, main can be written as public static void main(String args[]) or, in many ICSE papers, as static void main() when the method is run from BlueJ's menu.

Example:
class Welcome
{
public static void main(String args[])
{
System.out.println("Welcome to Java");
System.out.print("Bytecode runs ");
System.out.println("on the JVM");
}
}

Output:
Welcome to Java
Bytecode runs on the JVM

print() leaves the cursor on the same line; println() moves it to the next line after printing.

Worked example

(2 marks) Give the output:
System.out.print("OOP");
System.out.println(" in Java");
System.out.print("is fun");

Try it first, then show the solutionSolution
  1. print("OOP") stays on the line; println(" in Java") completes it and moves to a new line - 1 mark.
  2. print("is fun") appears on the second line - 1 mark.

Answer: OOP in Java
is fun

Introduction to Object Oriented Programming Concepts in real life

Each concept, met in an everyday situation. Read the situation, answer the question in your own words, then compare with the model answer. The one-line hook is what to remember.

Data abstraction

Suppose you book a train ticket on an app: you choose stations, date and seat, and pay, without knowing how the reservation server finds seats or talks to the bank.

Which OOP principle does this illustrate, and why?

Try it first, then show the solutionSolution
  1. Only the essential features (choose, book, pay) are shown to you.
  2. The complex background details are hidden.
  3. Showing essentials and hiding details is data abstraction.

Answer: Data abstraction: the app shows only the essential features you need and hides the internal working.

Memory hook: Use the buttons, not the wiring.

Inheritance

Imagine a school software has a class Person with name and age, and new classes Student and Teacher that reuse name and age and add roll number or subject.

Name the principle and one benefit.

Try it first, then show the solutionSolution
  1. Student and Teacher acquire the properties of Person.
  2. This is inheritance.
  3. Benefit: name and age are written once and reused.

Answer: Inheritance; it allows code reuse, since common features are written once in Person and shared by Student and Teacher.

Memory hook: Children inherit from parents; subclasses from superclasses.

Platform independence

Suppose Riya compiles her Java game on a Windows laptop and emails only the .class file to a friend with a Linux computer, who runs it without recompiling.

Why does it work?

Try it first, then show the solutionSolution
  1. Compilation produced bytecode, not Windows machine code.
  2. The friend's computer has its own JVM for Linux.
  3. That JVM runs the same bytecode.

Answer: Because bytecode is platform independent and each operating system has its own JVM to run it: 'write once, run anywhere'.

Memory hook: One bytecode, many JVMs.

Topics in this chapter

Introduction to Object Oriented Programming Concepts: syntax and key facts

Compilation path
  1. 1.Source code (.java)
  2. 2.javac
  3. 3.Bytecode (.class)
  4. 4.JVM
  5. 5.Machine (object) code
JVM differs per platform; bytecode does not.
Four principles
Abstraction (hide details), Encapsulation (wrap data + methods), Inheritance (reuse), Polymorphism (many forms)
One real-life example each.
Output statements
System.out.print(x) - same line; System.out.println(x) - then new line
println() with nothing just moves to a new line.
Program types
Application: stand-alone, main(); Applet: in web page, browser, no main()

How the board asks Introduction to Object Oriented Programming Concepts

The question patterns to expect, and the method that works for each.

Question typeHow it is askedMethod
MCQ (Section A)Extension of a source file (2024); what converts bytecode to machine code; identify the principle in a real-life situation.Remember .java/.class and JVM; match 'hiding details' to abstraction, 'wrapping' to encapsulation, 'acquiring' to inheritance, 'many forms' to polymorphism.
Short answer (2 marks)Define a principle with an example; POP vs OOP; application vs applet; what is the JVM.Definition in one sentence plus a real-life or Java example.
Program (Section B, 15 marks)This chapter supplies the basics (class, main, output statements) used in every program.Write a correctly named class, main method and clear output statements.

Tricks to remember Introduction to Object Oriented Programming Concepts

Short memory aids. Say each one aloud once, then use it on a question the same day.

  • A PIE

    Abstraction, Polymorphism, Inheritance, Encapsulation.

    Use it when: The four OOP principles.

  • Java → class → JVM

    You write .java, javac makes .class, the JVM makes it run.

    Use it when: Compilation process questions.

Introduction to Object Oriented Programming Concepts: board-level solved questions

Ordered from board level to HOTS. Cover the solution, write your own, then compare step by step.

Example 1: JVM role · 1 mark · MCQBoard level

Which of the following converts bytecode into machine code?
(a) javac
(b) JVM
(c) BlueJ editor
(d) Source code

Try it first, then show the solutionSolution
  1. javac converts source to bytecode; the JVM runs bytecode as machine code.

Answer: (b) JVM

Example 2: Identify the principle · 1 mark · MCQHarder board level

A television remote has buttons for volume and channel, but the circuits inside are sealed in its case and cannot be changed directly. Which principle does the sealed case with buttons best represent?
(a) Inheritance
(b) Polymorphism
(c) Encapsulation
(d) Compilation

Try it first, then show the solutionSolution
  1. Data/circuits wrapped in a unit, reachable only through the buttons (methods): encapsulation.

Answer: (c) Encapsulation

Example 3: Assertion and reason: platform independence · 1 mark · Assertion-reasonHarder board level

Assertion (A): Java is called platform independent.
Reason (R): The Java compiler produces bytecode that can be run by a JVM on any operating system.
(a) Both A and R are true and R is the correct explanation of A
(b) Both A and R are true but R is not the correct explanation of A
(c) A is true but R is false
(d) A is false but R is true

Try it first, then show the solutionSolution
  1. Platform independence comes from bytecode + JVM per platform.

Answer: (a) Both A and R are true and R is the correct explanation of A

Example 4: Abstraction vs encapsulation · 2 marks · Very short answerHarder board level

Distinguish between data abstraction and encapsulation with one example each.

Try it first, then show the solutionSolution
  1. Abstraction: show essentials, hide details (driving a car without knowing the engine).
  2. Encapsulation: bind data and methods into one unit and restrict access (a class with private data).

Answer: Data abstraction shows only essential features and hides background details, as a driver uses the steering and brakes without knowing how the engine works. Encapsulation wraps data and the methods that use it into one unit and restricts direct access, as a class keeps its data private and allows access only through its methods.

Example 5: Compilation steps · 2 marks · Short answerBoard level

Explain the steps by which a Java program is compiled and executed. Define source code, bytecode and object code.

Try it first, then show the solutionSolution
  1. Source code (.java) is compiled by javac into bytecode (.class).
  2. The JVM interprets the bytecode into object (machine) code, which the processor executes.

Answer: The programmer writes source code (the Java program, saved as .java). The compiler javac checks it and translates it into bytecode, an intermediate platform-independent code saved as .class. The JVM then translates the bytecode into object code, the machine code of that computer, which the processor executes to give the output.

Example 6: Output with print and println · 2 marks · Very short answerHarder board level

Give the output of:
System.out.print("Java");
System.out.print(" is");
System.out.println();
System.out.println("robust");
System.out.print("and secure");

Try it first, then show the solutionSolution
  1. "Java" and " is" print on line 1; println() ends line 1.
  2. "robust" is line 2 and moves to line 3; "and secure" prints on line 3.

Answer: Java is
robust
and secure

Example 7: Model a library book · 15 marks · Long answerHOTS / competency

Suppose a library system is being designed in Java. Define a class Book with private members title (String) and issued (boolean), and public methods: void setTitle(String t) to set the title and mark the book available; void issueBook(), which prints 'Already issued' if the book is out and otherwise marks it issued; void returnBook(); and void show(), which prints the title followed by ' : issued' or ' : available'. In main(), set the title Kim, issue the book, show it, try to issue it again, return it and show it. Name the OOP principle shown by private data changed only through public methods.

Try it first, then show the solutionSolution
  1. class Book
    {
    private String title;
    private boolean issued;
    public void setTitle(String t)
    {
    title = t;
    issued = false;
    }
    public void issueBook()
    {
    if (issued)
    System.out.println("Already issued");
    else
    issued = true;
    }
  2. public void returnBook()
    {
    issued = false;
    }
    public void show()
    {
    if (issued)
    System.out.println(title + " : issued");
    else
    System.out.println(title + " : available");
    }
  3. public static void main(String args[])
    {
    Book b = new Book();
    b.setTitle("Kim");
    b.issueBook();
    b.show();
    b.issueBook();
    b.returnBook();
    b.show();
    }
    }
  4. Trace: after the first issueBook() issued is true, so show() prints 'Kim : issued'; the second issueBook() finds it true and prints 'Already issued'; returnBook() makes it false, so show() prints 'Kim : available'.
  5. Principle: encapsulation (data hiding), because title and issued are private and change only through the public methods; the user of the class also sees only issueBook() and returnBook(), not how the status is stored (data abstraction).

Answer: Output:
Kim : issued
Already issued
Kim : available
Principle: encapsulation; private data can be changed only through the class's public methods.

Case-study practice (Section B style)

Read the situation, then answer every part. In the board paper this is a 10-mark question split into 2 + 3 + 5 marks.

Building a food-delivery app

Imagine a team writing a food-delivery app in Java. They create a class Customer and a class Restaurant; a class PremiumCustomer reuses everything in Customer and adds free delivery. A method pay() works for card, wallet or cash on delivery. Customers see only 'Place order' and 'Track' and never the database. The team writes the code on Windows, but the server runs Linux.

  1. (i) · 2 marks

    Which OOP principles are shown by PremiumCustomer and by the screen showing only 'Place order' and 'Track'?

    Answer

    Answer: PremiumCustomer: inheritance. The simple screen: data abstraction.

    1 mark each.

  2. (ii) · 3 marks

    Which principle does pay() working in three ways show? Explain.

    Answer

    Answer: Polymorphism: one method name takes many forms, behaving differently for card, wallet or cash (for example, overloaded versions with different parameters).

    Principle 1 mark; explanation 2 marks.

  3. (iii) · 5 marks

    Why can the code written on Windows run on the Linux server? Explain the compilation process and two features of Java involved.

    Answer

    Answer: The .java source is compiled by javac into platform-independent bytecode (.class). The Linux server has its own JVM, which converts the same bytecode into Linux machine code. Features: platform independence (write once, run anywhere) and security/robustness, since the JVM checks bytecode before running it.

    Process 3 marks; features 1 mark each.

Where the marks are

How a typical answer is split into step marks. Show every step: a right final answer alone rarely earns full marks.

Define inheritance with a real-life example. (2 marks) (2 marks)

StepMarks
Definition: one class acquires properties and methods of another.1
Real-life example (child and parent / Car from Vehicle).1

Program: class Book with private data and public methods (setTitle, issueBook, returnBook, show) and main(). (15 marks) (15 marks)

StepMarks
Class header and private member variables with correct types.2
setTitle() assigning the title and status.2
issueBook() with the check and message.3
returnBook() resetting the status.2
show() printing the title and the correct status.2
main(): object creation and calls in the given order.3
Principle named (encapsulation).1

Where students lose marks in Introduction to Object Oriented Programming Concepts

The slips examiners see most often, and what to write instead.

  • Mistake: Wrong file extensions

    In 2024 the board asked for the extension of a source file; students mix .java and .class.

    Do this: Source = .java; bytecode = .class.

    Usually costs: 1 mark.

  • Mistake: Defining a principle without an example

    The syllabus requires each principle to be explained with real-life examples.

    Do this: Always add a real-life example after the definition.

    Usually costs: 1 mark of 2.

  • Mistake: Saying the compiler produces machine code

    Students carry the idea over from other languages.

    Do this: javac produces bytecode; the JVM turns it into machine code.

    Usually costs: 1 mark.

  • Mistake: Mixing print and println in output questions

    Examiners noted in 2025 that candidates ignored that print() is followed by println() on the same line.

    Do this: Track the cursor: print stays, println moves on after printing.

    Usually costs: 1 to 2 marks.

Practice questions on Introduction to Object Oriented Programming Concepts

Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.

  1. Q1 · 1 mark · MCQBoard level

    The file produced by compiling Bill.java is:
    (a) Bill.exe
    (b) Bill.class
    (c) Bill.obj
    (d) Bill.jvm

    Hint

    Bytecode file.

    Answer

    (b) Bill.class

  2. Q2 · 1 mark · MCQBoard level

    Which principle allows a class to reuse the properties of another class?
    (a) Encapsulation
    (b) Inheritance
    (c) Abstraction
    (d) Polymorphism

    Hint

    Parents and children.

    Answer

    (b) Inheritance

  3. Q3 · 1 mark · MCQHarder board level

    Java does not support pointers. Which two features does this help?
    (a) Simple and secure
    (b) Multithreaded and distributed
    (c) Compiled and slow
    (d) Platform dependent and simple

    Hint

    No direct memory access.

    Answer

    (a) Simple and secure

  4. Q4 · 2 marks · Very short answerBoard level

    Define encapsulation with a real-life example.

    Hint

    Capsule.

    Answer

    Encapsulation is wrapping data and the methods that operate on it into a single unit (a class) and restricting direct access to the data. Example: a medicine capsule encloses the medicine; a bank account can be changed only through deposit and withdraw operations.

  5. Q5 · 2 marks · Very short answerHarder board level

    What is the JVM? Why is it called a virtual machine?

    Hint

    Software computer.

    Answer

    The Java Virtual Machine is software that runs Java bytecode by translating it into the machine code of the computer. It is 'virtual' because it is not a physical machine but software that behaves like a computer able to understand bytecode.

  6. Q6 · 2 marks · Short answerHOTS / competency

    Why is Java described as both compiled and interpreted?

    Hint

    Two stages.

    Answer

    Because source code is first compiled by javac into bytecode, and then the bytecode is interpreted (or JIT-compiled) by the JVM into machine code at run time.

  7. Q7 · 2 marks · Very short answerHarder board level

    Give the output:
    System.out.println("A");
    System.out.print("B");
    System.out.print("C");
    System.out.println("D");

    Hint

    Where do line breaks happen?

    Answer

    A
    BCD

  8. Q8 · 2 marks · Very short answerBoard level

    State any two features of Java and explain each in one sentence.

    Hint

    Simple, OO, portable, robust, secure.

    Answer

    (1) Platform independent: bytecode runs on any machine that has a JVM. (2) Secure: programs run inside the JVM, which checks the bytecode and limits access to system resources. (Others: simple, object oriented, robust, compiled and interpreted, multithreaded, case sensitive.)

  9. Q9 · 2 marks · Short answerHOTS / competency

    A student says, 'Polymorphism and inheritance are the same because both involve many classes.' Correct the student.

    Hint

    Reuse vs many forms.

    Answer

    They are different. Inheritance is one class acquiring the properties of another (reuse). Polymorphism is one name or message behaving in many forms, which can happen even within one class, as with overloaded methods.

Test your recall

Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.

  1. 1.Extension of Java source code?Show answer

    .java

  2. 2.What does javac produce?Show answer

    Bytecode (.class file).

  3. 3.Name the four OOP principles.Show answer

    Abstraction, encapsulation, inheritance, polymorphism.

  4. 4.Does an applet have main()?Show answer

    No.

  5. 5.What makes Java platform independent?Show answer

    Bytecode run by a JVM on each platform.

Best order to study it

  1. POP vs OOP.
  2. Four principles with real-life examples.
  3. Applets and applications.
  4. Source code, bytecode, object code, JVM, compilation steps.
  5. Features of Java.
  6. print vs println.

Quick revision checklist

The night before the exam: can you do each of these without looking?

  • POP: functions, open data; OOP: objects, hidden data.
  • Abstraction hides details; encapsulation wraps data + methods; inheritance reuses; polymorphism = many forms.
  • Application: stand-alone, main(); applet: web page, browser.
  • .java → javac → .class (bytecode) → JVM → machine code.
  • Features: simple, object oriented, platform independent, robust, secure, multithreaded, case sensitive.

Introduction to Object Oriented Programming Concepts: frequently asked questions

Is this chapter examined in Class X?

Yes. The Class X syllabus begins with revision of the Class IX topics, and the board paper includes them.

Do I need to write public static void main(String args[])?

In BlueJ, both public static void main(String args[]) and void main() / static void main() are seen in ICSE answers; the full form always works and is safest.

Are applets still used?

Modern browsers no longer run applets, but the syllabus still asks for their definition and difference from applications.

Based on: CISCE ICSE 2027 Computer Applications syllabus; CISCE Analysis of Pupil Performance ICSE 2025: Computer Applications (with the 2025 board paper)