Introduction to Object Oriented Programming using Java: ISC 11
Updated 15 October 2026 · Fact-checked
Object oriented programming organises a program around objects that combine data and the methods that act on it, created from classes. ISC Class 11 Computer Science introduces OOP using Java: classes and objects, the principles of encapsulation, abstraction, inheritance and polymorphism, and the routine of writing an algorithm, coding it and compiling with javac or an IDE.
What Introduction to Object Oriented Programming using Java is about
Before writing loops and arrays, you need the big picture: how a Java program is organised and why. Java is an object oriented language: you describe the kinds of things in a problem (accounts, rectangles, students) as classes, and create objects that hold data and carry out behaviour.
The CISCE 2028 syllabus (Section B, topic 4) introduces object oriented programming using Java, with topics 5 to 11 (objects, types, variables, statements, methods, arrays and strings, input/output) introduced almost simultaneously along with classes and their definitions. Programming assignments start with an appropriate algorithm followed by coding, using any text editor with javac or an IDE such as BlueJ, DrJava, Eclipse or NetBeans.
This page sets up that foundation with four complete Java programs, each compiled and run, whose output is shown exactly as produced.
Weightage: Introduction to Object Oriented Programming using Java is topic 4 of the ISC Class XI Computer Science syllabus, in Section B - Java. CISCE weights Section B at 30 of the 70 marks in Paper I (Theory). Class XI is examined by the school, so your school sets the paper within this weightage.Source: CISCE ISC Computer Science syllabus, examination year 2028, Class XI unit weightage
Key concepts
- Procedural vs object oriented programming
Procedure oriented programming (POP) organises a program as a sequence of procedures (functions) acting on data that is often shared globally. Example languages: C, older BASIC.
Object oriented programming (OOP) organises a program around objects, each combining data (attributes) and behaviour (methods). Objects interact by calling each other's methods.
Basis Procedural Object oriented Focus Procedures (what to do) Objects (who does it) Data Often global, freely accessible Hidden inside objects (encapsulated) Reuse Copy functions Inheritance and reusable classes Approach Top-down Bottom-up (build classes, combine them) Change Changes ripple through code Changes stay inside classes Examples C, FORTRAN Java, C++, Python Why OOP: programs model real-world things naturally; data is protected; code is easier to reuse, extend and maintain in large projects.
Worked example
State two advantages of OOP over procedural programming. [2 marks]
Try it first, then show the solutionSolution
- Data security: data is hidden inside objects and changed only through methods (encapsulation).
- Reusability: classes can be reused and extended through inheritance.
Answer: Data hiding (encapsulation) and code reuse (inheritance); also easier maintenance and natural modelling of real objects.
- Classes and objects: the first program
A class is a blueprint (template) that defines the data members (attributes, fields) and methods (behaviour) common to a group of objects. An object is an instance of a class: it has its own values of the data members (its state) and can carry out the methods.
Creating an object: ClassName obj = new ClassName(arguments); new allocates memory and calls a constructor, which sets the initial state.
Using an object: obj.methodName() calls a method on that object.
The Rectangle class below defines two data members and two methods; main creates two objects with different states.
// A first class: a Rectangle object bundles data (length, breadth) with behaviour (area, perimeter). public class Rectangle { private double length; // data members (attributes), hidden from outside: encapsulation private double breadth; public Rectangle(double l, double b) // constructor: gives a new object its starting state { length = l; breadth = b; } public double area() // behaviour (method) { return length * breadth; } public double perimeter() { return 2 * (length + breadth); } public static void main(String[] args) { Rectangle r1 = new Rectangle(12, 5); // two objects of the same class Rectangle r2 = new Rectangle(7.5, 4); System.out.println("r1 area = " + r1.area() + ", perimeter = " + r1.perimeter()); System.out.println("r2 area = " + r2.area() + ", perimeter = " + r2.perimeter()); } }Output:
r1 area = 60.0, perimeter = 34.0 r2 area = 30.0, perimeter = 23.0Both objects share the same code (area, perimeter) but hold different data, so they give different results.
Worked example
In the Rectangle program, name the class, its objects, its data members and its methods. [2 marks]
Try it first, then show the solutionSolution
- Class: Rectangle. Objects: r1 and r2.
- Data members: length, breadth. Methods: area(), perimeter() (plus the constructor and main).
Answer: Class Rectangle; objects r1, r2; data members length, breadth; methods area(), perimeter().
- Principles of OOP
1. Encapsulation: wrapping data and the methods that use it into a single unit (the class), and hiding the data (private) so it can be changed only through the class's methods. This protects data from misuse.
2. Abstraction: showing only essential features and hiding implementation details. You use acc.withdraw(500) without knowing how the balance is checked internally.
3. Inheritance: a new class (subclass) acquires the members of an existing class (superclass) and can add its own: class SavingsAccount extends BankAccount. It promotes reuse.
4. Polymorphism: 'many forms': the same method name behaves differently depending on the arguments or the object (for example, several constructors with different parameters, or area() meaning different things for a circle and a square).The class below shows encapsulation and abstraction: balance is private and can change only through deposit and withdraw, which enforce the rules.
// Encapsulation and abstraction: the balance can change only through deposit and withdraw, // which enforce the rules; the user of the class need not know how they work inside. public class BankAccount { private String holder; private double balance; public BankAccount(String name, double opening) { holder = name; balance = opening; } public void deposit(double amount) { if (amount > 0) balance = balance + amount; } public boolean withdraw(double amount) { if (amount > 0 && amount <= balance) { balance = balance - amount; return true; } return false; // refused: not enough money } public double getBalance() { return balance; } public static void main(String[] args) { BankAccount acc = new BankAccount("Meera", 5000); acc.deposit(2500); boolean ok1 = acc.withdraw(3000); boolean ok2 = acc.withdraw(6000); System.out.println("First withdrawal allowed? " + ok1); System.out.println("Second withdrawal allowed? " + ok2); System.out.println(acc.holder + "'s balance = " + acc.getBalance()); } }Output:
First withdrawal allowed? true Second withdrawal allowed? false Meera's balance = 4500.0The second withdrawal (₹6,000) is refused because only ₹4,500 remains: the rule lives inside the class, so no outside code can make the balance negative.
Worked example
Why is balance declared private in BankAccount? [1 mark]
Try it first, then show the solutionSolution
- Private data can be changed only through the class's methods, which check the rules.
Answer: To encapsulate it: outside code cannot set an invalid balance; it must use deposit and withdraw.
- Structure of a Java program
// comment: explains the program import java.util.Scanner; // import statement (library classes) public class ClassName // class header { // data members (fields) // constructors // methods public static void main(String[] args) // execution starts here { // statements } }Key rules:
1. Every statement ends with a semicolon; blocks are enclosed in braces { }.
2. Java is case-sensitive: Main and main are different.
3. A public class must be saved in a file with the same name (Rectangle.java).
4. Execution begins at public static void main(String[] args).
5. Comments: // single line; /* ... */ multi-line; /** ... */ documentation comments.
6. Identifiers (names) may contain letters, digits, _ and the dollar sign, must not start with a digit and must not be a keyword. Conventions: ClassName, methodName, variableName, CONSTANT_NAME.
7. Keywords (class, public, static, void, int, if, while, new, return ...) are reserved.Worked example
Which of these are valid identifiers: total_marks, 2ndPlace, class, rollNo? [1 mark]
Try it first, then show the solutionSolution
- 2ndPlace starts with a digit: invalid. class is a keyword: invalid.
Answer: Valid: total_marks and rollNo.
- From algorithm to code; compiling and running
Programming routine: (1) understand the problem; (2) write an algorithm (numbered steps in English or pseudocode); (3) dry-run it with sample data; (4) code it in Java; (5) compile and fix errors; (6) run and test with different inputs.
Algorithm for the sum of digits:
1. Read n.
2. sum = 0.
3. While n > 0: sum = sum + n % 10; n = n / 10.
4. Print sum.Dry run for n = 40729: digits taken 9, 2, 7, 0, 4; sum = 9, 11, 18, 18, 22.
// Algorithm first, then code: sum of the digits of a number, read with Scanner. // Algorithm: // 1. Read n. 2. sum = 0. 3. While n > 0: sum = sum + n % 10; n = n / 10. 4. Print sum. import java.util.Scanner; public class DigitSum { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter a number: "); int n = sc.nextInt(); int original = n; int sum = 0; while (n > 0) { sum = sum + n % 10; // last digit n = n / 10; // remove last digit } System.out.println(); System.out.println("Sum of digits of " + original + " = " + sum); } }Output (input 40729):
Enter a number: Sum of digits of 40729 = 22Compiling and running from the command line:
- javac DigitSum.java → creates DigitSum.class (bytecode), or lists compile-time errors.
- java DigitSum → the Java Virtual Machine runs the bytecode.
IDEs such as BlueJ (popular in schools: create a class, compile with a button, and create objects interactively on the object bench), DrJava, Eclipse and NetBeans combine an editor, compiler, debugger and runner.
Worked example
Dry-run the sum-of-digits algorithm for n = 3056 and give the output. [2 marks]
Try it first, then show the solutionSolution
- n = 3056: sum = 6, n = 305; sum = 11, n = 30; sum = 11, n = 3; sum = 14, n = 0.
- Loop ends; print 14.
Answer: 14.
- Features of Java
1. Object oriented: everything is organised in classes.
2. Platform independent (portable): source code compiles to bytecode (.class), which runs on any machine with a JVM: 'write once, run anywhere'.
3. Simple and familiar: C-like syntax without pointers or manual memory management.
4. Robust: strong type checking, exception handling and automatic garbage collection.
5. Secure: bytecode is verified; no direct memory access.
6. Multithreaded: several tasks can run at once.
7. Rich library (API): ready classes such as String, Math, Scanner.
8. Uses Unicode: text in any language.Compiler vs interpreter in Java: javac compiles source to bytecode once; the JVM interprets (or just-in-time compiles) bytecode on each run.
Worked example
Why is Java called platform independent? [1 mark]
Try it first, then show the solutionSolution
- javac produces bytecode, not machine code for one processor; any computer with a JVM can run it.
Answer: Because its bytecode runs on any machine that has a JVM, without recompiling.
Introduction to Object Oriented Programming using Java 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.
Class as a blueprint
Suppose a builder has one house plan and builds 20 houses from it, each painted a different colour and owned by a different family.
Map this to classes and objects.
Try it first, then show the solutionSolution
- The plan is the class: it defines what every house has (rooms, doors) and can do.
- Each house is an object with its own state (colour, owner).
Answer: Plan = class; each house = object (instance) with its own attribute values.
Memory hook: One blueprint, many houses.
Abstraction
Imagine driving a car: you press the accelerator and the car speeds up, without knowing how fuel injection works.
Which OOP principle does this illustrate?
Try it first, then show the solutionSolution
- The driver sees only the essential interface (pedals, steering).
- Internal details are hidden.
Answer: Abstraction: essential features shown, details hidden.
Memory hook: Use the pedal, ignore the engine.
Encapsulation
Suppose a medicine capsule keeps its powder inside a shell, released only in the stomach.
How is a Java class like the capsule?
Try it first, then show the solutionSolution
- Data members are wrapped inside the class with the methods that use them.
- Private data is accessed only in controlled ways through methods.
Answer: A class wraps data and methods together and controls access to the data, just as the capsule encloses and protects its contents.
Memory hook: Capsule = encapsulation.
Topics in this chapter
Introduction to Object Oriented Programming using Java: syntax and key facts
- Object creation
- ClassName obj = new ClassName(arguments);
- new allocates memory and calls the constructor.
- Method call
- obj.methodName(arguments)
- Compile and run
- 1.javac Name.java
- 2.Name.class (bytecode); java Name
- 3.JVM runs it
- Digit extraction
- last digit = n % 10; remove last digit: n = n / 10
- Integer division drops the remainder.
- Four pillars
- Encapsulation + Abstraction + Inheritance + Polymorphism
Introduction to Object Oriented Programming using Java: diagrams to practise
Practise each one on paper: draw it from the checklist, then tick off every label.
Class and objects diagram
Explain the relationship between a class and its objects.
Draw
- A box divided into three parts: class name (Rectangle), data members (length, breadth), methods (area(), perimeter()).
- Two arrows labelled 'new' to two object boxes: r1 (length 12, breadth 5) and r2 (length 7.5, breadth 4).
Label
- class name
- data members
- methods
- objects
Watch out: Show different values in each object to stress that objects have their own state.
Program development cycle
Describe the steps from problem to running program.
Draw
- Circle of boxes: Problem → Algorithm → Dry run → Code (Name.java) → javac → errors? (back to Code) → Name.class → java (JVM) → Output → Test with new inputs.
Label
- algorithm
- javac
- bytecode
- JVM
- testing
Watch out: Mark the loop back from compile errors to coding.
How the school exam asks Introduction to Object Oriented Programming using Java
The question patterns to expect, and the method that works for each.
| Question type | How it is asked | Method |
|---|---|---|
| Theory (1-2 marks) | Define class and object; name OOP principles; features of Java; valid identifiers. | One-line definitions with a Java example. |
| Short programs (2-5 marks) | Write an algorithm and a class for a simple task (area, conversion, digits); dry-run code. | Algorithm first, then a class with data members, constructor and methods. |
| Class design (10 marks) | Design a class with given data members and methods and a main method to test it. | Follow the specification exactly: names, return types and parameters as given. |
Tricks to remember Introduction to Object Oriented Programming using Java
Short memory aids. Say each one aloud once, then use it on a question the same day.
A PIE: the four pillars
Abstraction, Polymorphism, Inheritance, Encapsulation.
Use it when: Principles of OOP.
Class = cookie cutter; object = cookie
One cutter, many cookies, each can be decorated differently.
Use it when: Class vs object.
javac makes .class; java runs it
c for compile.
Use it when: Compiling and running.
% 10 takes, / 10 shakes off
n % 10 gives the last digit; n / 10 removes it.
Use it when: Digit problems.
Introduction to Object Oriented Programming using Java: exam-level solved questions
Ordered from exam level to HOTS. Cover the solution, write your own, then compare step by step.
Example 1: Instance · 1 mark · MCQExam level
An object is:
(a) a blueprint of a class
(b) an instance of a class
(c) a method of a class
(d) a keyword
Try it first, then show the solutionSolution
- A class is the blueprint; an object is a specific instance created from it.
Answer: (b) an instance of a class.
Example 2: Platform independence · 1 mark · Assertion-reasonHarder exam level
Assertion: A Java .class file compiled on Windows can run on Linux.
Reason: javac translates Java source into machine code for the processor it runs on.
(a) Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
(b) Both Assertion and Reason are true but Reason is not the correct explanation of Assertion.
(c) Assertion is true but Reason is false.
(d) Both Assertion and Reason are false.
Try it first, then show the solutionSolution
- Bytecode runs on any JVM (Assertion true); javac produces bytecode, not native machine code (Reason false).
Answer: (c)
Example 3: Output of the Rectangle program · 2 marks · Short answerExam level
In the Rectangle program, what would print if r2 were created as new Rectangle(9, 6)?
Try it first, then show the solutionSolution
- Area = 9 × 6 = 54.0; perimeter = 2 × (9 + 6) = 30.0.
- Java prints doubles with .0.
Answer: r2 area = 54.0, perimeter = 30.0
Example 4: OOP principles · 5 marks · Short answerHarder exam level
Explain the four principles of OOP with a Java example of each.
Try it first, then show the solutionSolution
- Encapsulation: private double balance with public deposit() and withdraw() in BankAccount.
- Abstraction: users call acc.withdraw(500) without knowing how the check is made.
- Inheritance: class SavingsAccount extends BankAccount reuses its members and adds interest.
- Polymorphism: two constructors Rectangle(double l, double b) and Rectangle(double side) share one name but behave differently.
- Together they make code safer, reusable and easier to maintain.
Answer: Encapsulation (private data with methods), abstraction (hide details), inheritance (extends), polymorphism (same name, different forms), each with an example.
Example 5: Algorithm and dry run · 5 marks · Short answerHOTS / competency
Write an algorithm to reverse a number and check whether it is a palindrome. Dry-run it for 12321 and 9080.
Try it first, then show the solutionSolution
- 1. Read n; copy = n; rev = 0.
- 2. While n > 0: rev = rev × 10 + n % 10; n = n / 10.
- 3. If rev = copy, print 'palindrome'; otherwise print 'not a palindrome'.
- 12321: rev = 1, 12, 123, 1232, 12321 → palindrome.
- 9080: rev = 0, 8, 80, 809 → 809 ≠ 9080, so it is not a palindrome (the trailing zero is lost on reversal).
Answer: 12321 is a palindrome; 9080 reverses to 809 and is not.
Example 6: Design the Temperature class · 10 marks · Long answerHOTS / competency
Design a class Temperature with a private data member celsius (double); a parameterised constructor; methods double toFahrenheit(), double toKelvin() and String classify() returning 'freezing' below 0, 'moderate' below 25 and 'hot' otherwise; and main() that creates objects for −5, 18 and 37 and prints the conversions.
Try it first, then show the solutionSolution
- private double celsius; constructor Temperature(double c) { celsius = c; }.
- toFahrenheit(): return celsius × 9 / 5 + 32.
- toKelvin(): return celsius + 273.15.
- classify(): if celsius < 0 return "freezing"; else if celsius < 25 return "moderate"; else return "hot".
- main(): loop over an array {−5, 18, 37}; create an object for each and print the three results.
- Output (compiled program): −5.0 C = 23.0 F = 268.15 K (freezing); 18.0 C = 64.4 F = 291.15 K (moderate); 37.0 C = 98.6 F = 310.15 K (hot).
Answer: See the compiled Temperature program below; it prints the three lines shown in the last step.// A class that stores a temperature in Celsius and converts it, with a classification method.
public class Temperature
{
private double celsius;
public Temperature(double c)
{
celsius = c;
}
public double toFahrenheit()
{
return celsius * 9 / 5 + 32;
}
public double toKelvin()
{
return celsius + 273.15;
}
public String classify()
{
if (celsius < 0)
return "freezing";
else if (celsius < 25)
return "moderate";
else
return "hot";
}
public static void main(String[] args)
{
double[] readings = {-5, 18, 37};
for (int i = 0; i < readings.length; i++)
{
Temperature t = new Temperature(readings[i]);
System.out.println(readings[i] + " C = " + t.toFahrenheit() + " F = "
+ t.toKelvin() + " K (" + t.classify() + ")");
}
}
}
Case-study practice (Section D style)
Read the situation, then answer every part. In a school exam set on the board pattern this is a 5-mark question split into 2 + 2 + 1 marks.
School library system
Suppose a student team designs a library program. They identify Book (title, author, copies available) and Member (name, books borrowed). A Book can be issued only if copies are available; a Member may borrow at most 3 books. A teacher suggests first writing the steps of 'issue a book' in English before coding.
(i) · 2 marks
Identify the classes, two data members and one method for each.
Answer
Answer: Book: title, copies; method issue(). Member: name, booksBorrowed; method borrow().
1 mark each class.
(ii) · 2 marks
Which OOP principle ensures copies cannot become negative? Explain.
Answer
Answer: Encapsulation: copies is private and changed only by issue(), which checks copies > 0 before reducing it.
1 mark principle, 1 mark explanation.
(iii) · 1 mark
Write the algorithm for issuing a book.
Answer
Answer: 1. If book.copies > 0 and member.booksBorrowed < 3: copies = copies − 1; booksBorrowed = booksBorrowed + 1; print 'issued'. 2. Else print 'cannot issue'.
1 mark.
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.
Output of the Rectangle program for new values (2 marks) (2 marks)
| Step | Marks |
|---|---|
| Area and perimeter correct | 1 |
| Output format with .0 and labels | 1 |
Four OOP principles with examples (5 marks) (5 marks)
| Step | Marks |
|---|---|
| Each principle defined with a Java example (four) | 4 |
| Benefit summarised | 1 |
Temperature class (10 marks) (10 marks)
| Step | Marks |
|---|---|
| Data member and constructor | 2 |
| toFahrenheit and toKelvin | 2 |
| classify with correct conditions | 3 |
| main creating objects and printing | 2 |
| Correct output | 1 |
Where students lose marks in Introduction to Object Oriented Programming using Java
The slips examiners see most often, and what to write instead.
Mistake: Saying a class occupies memory for data
Memory for instance data is allocated when an object is created with new.
Do this: Class = template; object = memory with values.
Usually costs: 1 mark.
Mistake: Naming the file differently from the public class
A public class Rectangle must be in Rectangle.java, or javac reports an error.
Do this: Match file name and class name exactly, including case.
Usually costs: 1 mark.
Mistake: Writing code without an algorithm when one is asked
Algorithm marks are separate.
Do this: Number the steps in English before coding.
Usually costs: 1-2 marks.
Mistake: Confusing encapsulation and abstraction
Encapsulation wraps and hides data; abstraction hides implementation details and shows essentials.
Do this: Encapsulation = capsule (wrapping); abstraction = interface (what, not how).
Usually costs: 1 mark.
Practice questions on Introduction to Object Oriented Programming using Java
Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.
Q1 · 1 mark · MCQExam level
Which principle allows a class to acquire the properties of another class?
(a) encapsulation
(b) abstraction
(c) inheritance
(d) polymorphismHint
extends.
Answer
(c) inheritance.
Q2 · 1 mark · Very short answerExam level
What is the extension of the file produced by javac?
Hint
Bytecode.
Answer
.class (bytecode).
Q3 · 2 marks · Short answerExam level
Differentiate between a class and an object.
Hint
Blueprint vs instance.
Answer
A class is a blueprint defining data members and methods; it is a logical entity. An object is an instance of a class with its own state, created with new and occupying memory.
Q4 · 2 marks · Short answerHarder exam level
Give the output of the DigitSum program for the input 908070.
Hint
Zeros add nothing.
Answer
Digits 0, 7, 0, 8, 0, 9 give 24; the program prints 'Sum of digits of 908070 = 24' (after the prompt).
Q5 · 2 marks · Short answerHarder exam level
In BankAccount, what is printed if the second withdrawal is changed to withdraw(4500)?
Hint
Balance after the first withdrawal.
Answer
Balance after deposit and first withdrawal = 5000 + 2500 − 3000 = 4500, so withdraw(4500) is allowed: 'Second withdrawal allowed? true' and 'Meera's balance = 0.0'.
Q6 · 5 marks · Short answerHarder exam level
Explain four features of Java.
Hint
Portable, OO, robust, secure.
Answer
Platform independent: bytecode runs on any JVM. Object oriented: programs are built from classes and objects. Robust: strong typing, exception handling and garbage collection. Secure: bytecode verification and no pointers (also simple, multithreaded, rich library, Unicode).
Q7 · 5 marks · Short answerHOTS / competency
Write a class Circle with a private radius, a constructor, and methods area() and circumference(), and give the output for radius 7 using Math.PI (rounded to two decimals).
Hint
πr² and 2πr.
Answer
class Circle { private double r; Circle(double x) { r = x; } double area() { return Math.PI * r * r; } double circumference() { return 2 * Math.PI * r; } }. For r = 7: area ≈ 153.94, circumference ≈ 43.98.
Q8 · 2 marks · Short answerHarder exam level
Why do we write an algorithm before coding? Give three reasons.
Hint
Logic, errors, language.
Answer
It clarifies the logic before worrying about syntax; mistakes can be found by dry-running early; and it is language-independent, so it can be coded in any language and understood by others.
Q9 · 10 marks · Long answerHOTS / competency
Design a class Student with private name and marks (three subjects), a constructor, methods double average() and char grade() (A for average ≥ 80, B for ≥ 60, otherwise C), and a main() that prints the results for ("Isha", 78, 85, 92) and ("Karan", 55, 62, 58).
Hint
Store marks in three ints or an array.
Answer
Data members: String name; int m1, m2, m3. Constructor assigns all four. average() returns (m1 + m2 + m3) / 3.0. grade(): avg ≥ 80 → 'A'; ≥ 60 → 'B'; else 'C'. main creates two objects and prints name, average and grade. Results: Isha average 85.0, grade A; Karan average 58.33 (175 ÷ 3), grade C.
Q10 · 2 marks · Short answerHOTS / competency
Identify two compile-time errors in: public class Demo { public static void main(String[] args) { int x = 5 System.out.println(X); } }
Hint
Semicolon; case.
Answer
A missing semicolon after int x = 5; and X is undefined because Java is case-sensitive (the variable is x).
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.Class?Show answer
A blueprint defining data members and methods.
2.Object?Show answer
An instance of a class with its own state.
3.Four pillars?Show answer
Encapsulation, abstraction, inheritance, polymorphism.
4.Where does execution start?Show answer
public static void main(String[] args).
5.Command to compile?Show answer
javac Name.java.
6.What runs bytecode?Show answer
The Java Virtual Machine (JVM).
Best order to study it
- Procedural vs object oriented programming.
- Classes and objects; the first class.
- Four principles of OOP.
- Structure of a Java program; identifiers and comments.
- Algorithm, dry run, coding, compiling, running.
- Features of Java; IDEs.
Quick revision checklist
The night before the exam: can you do each of these without looking?
- OOP: objects = data + methods; class = blueprint; object = instance.
- Encapsulation (wrap and hide), abstraction (essentials), inheritance (extends), polymorphism (many forms).
- Program: imports, class, fields, constructors, methods, main.
- Algorithm → dry run → code → javac → java → test.
- Java: portable bytecode, robust, secure, Unicode.
- IDEs: BlueJ, DrJava, Eclipse, NetBeans.
Introduction to Object Oriented Programming using Java: frequently asked questions
Do I need BlueJ, or can I use any editor?
Any text editor with javac and java, or any IDE such as BlueJ, DrJava, Eclipse or NetBeans, is acceptable according to the syllabus. BlueJ is popular in schools because it shows classes and objects visually.
Is Java fully object oriented?
Mostly. Everything is written inside classes, but Java also has primitive types (int, double and so on) that are not objects, which is why it is sometimes called not purely object oriented.
How detailed should inheritance and polymorphism be in Class XI?
At this stage you need their meaning with simple examples; Class XI programs use classes, objects, constructors and methods. Inheritance in depth is studied later.
Based on: CISCE ISC 2028 Computer Science syllabus (Classes XI and XII); CISCE Regulations for the ISC Examination Year 2028 (Class XI internal examination)