Methods in Java: Arguments, Static Members and this, ISC Class 12 Computer Science
Updated 15 October 2026 · Fact-checked
A method is a named block of code that performs one operation on an object's data. ISC Class 12 covers formal and actual arguments, why primitive and object arguments behave differently, static methods and variables, the this operator, and using methods to solve number problems and find roots of equations.
What Methods is about
The syllabus asks for:
1. Methods as abstractions for complex user-defined operations on objects.
2. Formal arguments and actual arguments; the different behaviour of primitive and object arguments.
3. Static methods and variables.
4. The this operator.
5. Algorithmic problem solving using methods (number problems, finding roots of algebraic equations and so on).
In the 2025 report, CISCE examiners listed 'Invoking methods in another method (nested methods)', 'Passing objects to functions', 'Concept of this operator' and 'Use of a single instance variable for multiple operations in various functions' among the difficult or confused topics, and the 2025 Section B included a class whose check method received two objects of the same class. This chapter covers exactly these skills.
All programs on this page were compiled and run; the outputs shown are exactly what they printed.
Weightage: CISCE publishes no chapter or unit weightage for ISC Computer Science. Methods is part of Section B, 9 of the 2027 syllabus and can be asked anywhere in the 70-mark Paper 1 (Part I compulsory: ten 1-mark items and a 10-mark short-answer question; Part II: two of three 10-mark questions in each of Sections A and B, and two of three 5-mark questions in Section C).Source: CISCE ISC Computer Science (868) syllabus, examination year 2027; latest Paper 1 specimen (2025) and the 2025 board paper
Key concepts
- Methods as abstractions; parts of a method
A method packages an operation so that it can be used by name without repeating its details: an abstraction. Breaking a program into methods makes it easier to write, test, read and reuse.
Parts of a method:
access-specifier [static] return-type name(parameter list) { body }
Example: public int sumDigits(int n) { ... }
1. Access specifier: public, private, protected or default.
2. static (optional): makes it a class method.
3. Return type: the type of value returned, or void if none.
4. Name and parameter list: together form the method signature (name + number, types and order of parameters).
5. Body: the statements; a non-void method must return a value of its type on every path.Kinds of methods by purpose:
- Accessor (getter): returns a data member's value without changing it.
- Mutator (setter): changes a data member.
- Pure method: returns a value and does not change the object's state; impure methods change state.
Method overloading: several methods in one class with the same name but different parameter lists (number, type or order). The compiler chooses by the arguments. The return type alone cannot distinguish overloaded methods.
Calling one method from another: inside the class, call it by name (find( ) inside display( )); the call runs and returns before the next statement. Examiners expect this whenever a question says 'by invoking'.
Worked example
[2] What is method overloading? Give two valid headers that overload area. (Understand)
Try it first, then show the solutionSolution
- Overloading: several methods with the same name in a class but different parameter lists (number, type or order) - 1 mark.
- double area(double r) and int area(int l, int b) - 1 mark.
Answer: Method overloading means defining methods with the same name but different parameter lists in one class, e.g. double area(double r) for a circle and int area(int l, int b) for a rectangle; the arguments decide which runs.
- Formal and actual arguments; primitive versus object arguments
Formal arguments (parameters): the variables in the method header that receive values (int x in bump(int x)).
Actual arguments: the values or expressions passed in the call (bump(n)).
They must match in number, order and compatible type.Java always passes a copy of the value (call by value):
1. Primitive argument: the method gets a copy of the number; changing the parameter does not change the caller's variable.
2. Object (or array) argument: the value copied is the reference, so both refer to the same object. Changing the object's fields through the parameter is visible to the caller. But making the parameter refer to a new object (p = new ...) does not affect the caller's reference.// Primitive arguments versus object arguments (Java always passes a copy of the value; // for an object the value copied is the reference, so the method can change the object). public class PassDemo { int score; PassDemo(int s) { score = s; } static void bumpPrimitive(int x) { x = x + 10; // changes only the local copy } static void bumpObject(PassDemo p) { p.score = p.score + 10; // changes the object the caller also refers to } static void replaceObject(PassDemo p) { p = new PassDemo(999); // the local reference now points elsewhere; p.score = 1000; // the caller's object is untouched } static void doubleAll(int[] a) { for (int i = 0; i < a.length; i++) a[i] = a[i] * 2; // arrays are objects: the caller sees the change } public static void main(String[] args) { int n = 5; bumpPrimitive(n); System.out.println("n = " + n); PassDemo d = new PassDemo(5); bumpObject(d); System.out.println("d.score after bumpObject = " + d.score); replaceObject(d); System.out.println("d.score after replaceObject = " + d.score); int[] arr = {1, 2, 3}; doubleAll(arr); System.out.println("arr = " + arr[0] + " " + arr[1] + " " + arr[2]); } }Output:
n = 5 d.score after bumpObject = 15 d.score after replaceObject = 15 arr = 2 4 6n stays 5; d.score becomes 15 through bumpObject, and stays 15 after replaceObject because only the local reference was redirected; the array is doubled because arrays are objects.
Worked example
[2] Distinguish between formal and actual arguments, with an example. (Understand)
Try it first, then show the solutionSolution
- Formal: variables declared in the method header that receive values, e.g. int x in void bump(int x) - 1 mark.
- Actual: the values passed in the call, e.g. n in bump(n) - 1 mark.
Answer: Formal arguments are the parameters in a method's header (int x in bump(int x)); actual arguments are the values supplied when it is called (n in bump(n)). The actual values are copied into the formal parameters.
- Static methods and variables
Static (class) variable: one copy for the whole class, shared by all objects; created when the class is loaded. Used for counters, constants and shared resources (a shared Scanner, for example).
Static method: belongs to the class; called with the class name (Math.sqrt(x), Bisection.f(2)) without creating an object.Rules for static methods:
1. They can use static variables and call other static methods directly.
2. They cannot use instance variables or call instance methods directly (there is no current object), and cannot use this or super.
3. main( ) is static so that the JVM can run it without an object; inside main( ) you must create an object to call instance methods.Instance methods can use both instance and static members.
When to make a method static: when it does not depend on any object's data, e.g. a utility such as isPrime(int x) or f(double x) in a root-finding program.
Worked example
[2] Why does a static method fail to compile if it uses an instance variable directly? (Analyse)
Try it first, then show the solutionSolution
- A static method belongs to the class and can run without any object - 1 mark.
- Instance variables exist only inside objects, so with no current object (no this) the compiler cannot tell whose variable is meant - 1 mark.
Answer: Because a static method has no current object: it can run before any object exists, so it has no this through which to reach an instance variable. It must use an object reference (ob.x) or only static members.
- The this operator and methods working on objects
this refers to the current object, the one on which an instance method or constructor was called.
Uses:
1. Distinguish fields from parameters with the same name: this.hrs = hrs;
2. Make it explicit that a member of the current object is meant, especially when another object of the same class is also involved: this.hrs + t.hrs.
3. Call another constructor of the same class: this(0, 0);
4. Pass or return the current object: return this;Methods with object parameters and object return values are common in Section B: adding two times, two distances, two fractions or two matrices, or comparing two objects.
import java.util.Scanner; // Adds two durations given in hours and minutes, using an object as a parameter // and returning a new object. public class Time { int hrs, mins; static Scanner sc = new Scanner(System.in); // one Scanner shared by all objects Time() { hrs = 0; mins = 0; } Time(int h, int m) { hrs = h; mins = m; } void accept() { System.out.println("Enter hours and minutes:"); hrs = sc.nextInt(); mins = sc.nextInt(); } // returns the sum of the current object and t, with minutes below 60 Time addTime(Time t) { int total = (this.hrs + t.hrs) * 60 + this.mins + t.mins; return new Time(total / 60, total % 60); } // true if this duration is longer than t boolean longerThan(Time t) { return hrs * 60 + mins > t.hrs * 60 + t.mins; } void display() { System.out.println(hrs + " h " + mins + " min"); } public static void main(String[] args) { Time a = new Time(); Time b = new Time(); a.accept(); b.accept(); Time c = a.addTime(b); System.out.print("Sum: "); c.display(); System.out.println("First longer than second? " + a.longerThan(b)); } }Input: 3 45 and 2 30
Enter hours and minutes: Enter hours and minutes: Sum: 6 h 15 min First longer than second? trueIn a.addTime(b), this is a and t is b: (3 + 2) × 60 + 45 + 30 = 375 minutes = 6 h 15 min, returned as a new object; neither a nor b changes. The program shares one static Scanner: creating a new Scanner on System.in inside each call can lose input that the first Scanner has already read into its buffer.
Worked example
[2] In c = a.addTime(b), which object does this refer to inside addTime, and why is a new Time object returned instead of changing a? (Analyse)
Try it first, then show the solutionSolution
- this refers to a (the object on which the method was called); t refers to b - 1 mark.
- Returning a new object keeps a and b unchanged so they can be used again; the sum is a separate value - 1 mark.
Answer: this is a and the parameter t is b. A new object is returned so that the original durations stay unchanged and the sum is stored separately in c.
- Algorithmic problem solving with methods: roots of equations
Splitting a numerical algorithm into methods keeps each part simple. The bisection method finds a root of f(x) = 0 in an interval [lo, hi] where f(lo) and f(hi) have opposite signs:
1. Find mid = (lo + hi) / 2.
2. If f(lo) and f(mid) have opposite signs (product ≤ 0), the root is in [lo, mid]; otherwise in [mid, hi].
3. Repeat until the interval is shorter than the tolerance; the midpoint is the root.
Each step halves the interval, so the number of steps grows only logarithmically with the required accuracy.For f(x) = x³ - x - 2 on [1, 2]: f(1) = -2 and f(2) = 4, so a root lies between them.
// Finds a root of f(x) = x^3 - x - 2 in [1, 2] by the bisection method. // Each method has one job: f( ) evaluates the function, root( ) narrows the interval. public class Bisection { static double f(double x) { return x * x * x - x - 2; } static double root(double lo, double hi, double tol) { int steps = 0; while (hi - lo > tol) { double mid = (lo + hi) / 2; if (f(lo) * f(mid) <= 0) hi = mid; // sign change in the left half else lo = mid; // otherwise it is in the right half steps++; } System.out.println("Iterations: " + steps); return (lo + hi) / 2; } public static void main(String[] args) { System.out.println("f(1) = " + f(1) + ", f(2) = " + f(2)); double r = root(1, 2, 0.0001); System.out.println("Root = " + Math.round(r * 10000) / 10000.0); } }Output:
f(1) = -2.0, f(2) = 4.0 Iterations: 14 Root = 1.5214(1 / 2^14 is about 0.00006, the first power of a half below 0.0001, hence 14 iterations.)
For a quadratic ax² + bx + c = 0, a method can compute the discriminant and the roots directly with the formula (see Variables, Expressions).
Worked example
[2] In the bisection method for x³ - x - 2 on [1, 2], give the interval after the first two steps. (Apply)
Try it first, then show the solutionSolution
- mid = 1.5: f(1.5) = 3.375 - 1.5 - 2 = -0.125; f(1) × f(1.5) > 0, so the root is in [1.5, 2] - 1 mark.
- mid = 1.75: f(1.75) = 5.359375 - 1.75 - 2 = 1.609375; f(1.5) × f(1.75) < 0, so the interval becomes [1.5, 1.75] - 1 mark.
Answer: After step 1: [1.5, 2]; after step 2: [1.5, 1.75] (the root is about 1.5214).
Methods 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.
Passing objects
Imagine lending a friend the key to your locker (a reference) versus giving them a photocopy of your timetable (a copy of a value).
Which is like passing an object and which like passing a primitive?
Try it first, then show the solutionSolution
- With the key, any change your friend makes inside the locker is visible to you: an object reference.
- Changes to the photocopy do not affect your original: a primitive copy.
Answer: Passing an object is like lending the key (both reach the same object); passing a primitive is like handing over a photocopy (changes stay with the copy).
Memory hook: Objects share the locker; primitives get a photocopy.
Static utility method
Suppose a school's computer has one shared calculator app used by every student; no student needs their own copy to use it.
Which kind of method is this like?
Try it first, then show the solutionSolution
- A static method belongs to the class, not to any object.
- Like Math.sqrt, it is called through the class name by everyone.
Answer: A static method such as Math.sqrt: shared, used through the class name, needing no object.
Memory hook: Static = shared tool on the class shelf.
Bisection
Imagine guessing a number between 1 and 100 when told only 'higher' or 'lower'; you always guess the middle.
Which root-finding method follows the same idea, and why is it fast?
Try it first, then show the solutionSolution
- Each guess halves the remaining range.
- Bisection halves the interval containing the root each step.
Answer: The bisection method: halving the interval each time reaches high accuracy in few steps (about 14 halvings shrink an interval of 1 below 0.0001).
Memory hook: Halve, check the sign, repeat.
Topics in this chapter
Methods: syntax and key facts
- Method header
- access [static] returnType name(type p1, type p2)
- Signature = name + parameter types and order.
- Argument passing
- Always by value; for objects the value is the reference
- Field changes visible; reassignment not.
- Overloading
- Same name, different parameter lists
- Return type alone is not enough.
- Bisection step
- mid = (lo + hi) / 2; if f(lo) × f(mid) ≤ 0 then hi = mid else lo = mid
- Stop when hi - lo < tolerance.
- Minutes arithmetic
- total = h × 60 + m; h = total / 60; m = total % 60
- Used in addTime.
How the board asks Methods
The question patterns to expect, and the method that works for each.
| Question type | How it is asked | Method |
|---|---|---|
| Section B with object parameters [10] | Methods such as Time addTime(Time t), boolean check(Colsum A, Colsum B) or Fraction add(Fraction f). | Use this for the calling object and the parameter name for the other; return a new object if asked; call methods 'by invoking' as instructed. |
| Theory [1]-[2] | Formal versus actual arguments; static versus instance; uses of this; overloading. | Definitions with a one-line example. |
| Output questions | Effect of a method on a primitive, an array and an object. | Primitives unchanged; object fields changed; reassigned reference has no effect on the caller. |
| Number algorithms | Methods for digits, primes, GCD, roots of equations. | One method per job; call them from a check or display method. |
Tricks to remember Methods
Short memory aids. Say each one aloud once, then use it on a question the same day.
F in header, A in call
Formal = in the Function header; Actual = At the call.
Use it when: Arguments.
Static has no this
No object, no this, no instance fields.
Use it when: Static rules.
Copy of value, always
Java copies; for objects it copies the address, not the object.
Use it when: Primitive versus object arguments.
Methods: board-level solved questions
Ordered from board level to HOTS. Cover the solution, write your own, then compare step by step.
Example 1: Overloading validity · 1 mark · MCQBoard level
Which pair of methods is NOT a valid overload in one class?
(a) int f(int a) and int f(double a)
(b) int f(int a) and double f(int b)
(c) void f() and void f(int a)
(d) int f(int a, double b) and int f(double a, int b)
Try it first, then show the solutionSolution
- Overloads must differ in parameter lists.
- In (b) both take one int; only the return type differs, which is not allowed.
Answer: (b).
Example 2: Static call · 1 mark · Very short answerBoard level
How is a static method f(double) of class Bisection called from another class?
Try it first, then show the solutionSolution
- Static methods belong to the class.
- Use the class name.
Answer: Bisection.f(2.0) (no object needed).
Example 3: Assertion-reason: arrays as arguments · 1 mark · Assertion-reasonHarder board level
Assertion (A): A method that doubles every element of an int array parameter changes the caller's array.
Reason (R): The method receives a copy of the reference, so it works on the same array object as the caller.
(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
- A is true (PassDemo prints arr = 2 4 6).
- R is true (Java copies the reference, not the array) and it is exactly why the caller sees the change: both references point to one array.
Answer: (a) Both A and R are true and R is the correct explanation of A.
Example 4: Output with objects · 2 marks · Short answerHarder board level
[2] Give the output of PassDemo's lines that print d.score after bumpObject and after replaceObject, and explain the second. (Analyse)
Try it first, then show the solutionSolution
- bumpObject changes the field through the shared reference: 15.
- replaceObject points its local parameter at a new object; the caller's d still refers to the old object: 15.
Answer: 15 and 15: reassigning the parameter to a new object does not affect the caller's reference.
Example 5: Time class · 10 marks · Long answerHOTS / competency
[10] Design a class Time with data members hrs and mins; a default and a parameterised constructor; void accept( ); Time addTime(Time t) returning the sum of the current object and t (minutes less than 60); boolean longerThan(Time t); and void display( ). Write main( ) to read two times, add them and compare them. (Create)
Try it first, then show the solutionSolution
- Data members int hrs, mins; Time( ) sets 0, 0; Time(int h, int m) assigns them.
- accept( ) reads hrs and mins (one shared Scanner).
- addTime: total = (this.hrs + t.hrs) × 60 + this.mins + t.mins; return new Time(total / 60, total % 60).
- longerThan: compare hrs × 60 + mins with t's value.
- display( ) prints hrs and mins.
- main( ): create a and b, accept both, c = a.addTime(b), display c, print a.longerThan(b). For 3 h 45 min and 2 h 30 min: 6 h 15 min, true.
Answer: See the compiled Time program: inputs 3 45 and 2 30 give 'Sum: 6 h 15 min' and 'First longer than second? true'.
Example 6: Root by bisection · 5 marks · Long answerHOTS / competency
[5] Write static methods f(double x) for x³ - x - 2 and root(double lo, double hi, double tol) using bisection, and state the root to four decimal places for [1, 2]. (Create)
Try it first, then show the solutionSolution
- f returns x * x * x - x - 2.
- root: while hi - lo > tol, mid = (lo + hi) / 2.
- If f(lo) * f(mid) <= 0, hi = mid, else lo = mid.
- Return (lo + hi) / 2 after the loop.
- Result for [1, 2], tolerance 0.0001: 1.5214 after 14 iterations (program output).
Answer: See the compiled Bisection program; the root is 1.5214 (14 iterations).
Case-study practice (Section D style)
Read the situation, then answer every part. In the board paper this is a 6-mark question split into 2 + 2 + 1 + 1 marks.
Dot product of two vectors (case-based)
A class Vec has data members int a[ ] and n; a constructor Vec(int nn) that sets n and allocates the array; void read( ); and int dot(Vec V) that returns the sum of the products of corresponding elements of the current object and V (both have n elements).
(i) · 2 marks
Write the constructor.
Answer
Answer: Vec(int nn) { n = nn; a = new int[n]; }
1 for the assignment, 1 for allocation with new.
(ii) · 2 marks
Write the body of dot( ).
Answer
Answer: int s = 0; for (int i = 0; i < n; i++) s += this.a[i] * V.a[i]; return s;
1 for the loop using both objects, 1 for accumulating and returning.
(iii) · 1 mark
How many objects should main( ) create, and how is dot( ) called?
Answer
Answer: Two objects, p and q, each read with read( ); then int d = p.dot(q); (p is this, q is V) and d is printed with a message.
1 mark.
(iv) · 1 mark
For p = {2, 3, 1} and q = {4, 0, 5}, what does p.dot(q) return?
Answer
Answer: 13: 2 × 4 + 3 × 0 + 1 × 5 = 8 + 0 + 5.
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.
[2] Formal versus actual arguments. (2 marks)
| Step | Marks |
|---|---|
| Formal defined with example. | 1 |
| Actual defined with example. | 1 |
[5] Bisection methods and root. (5 marks)
| Step | Marks |
|---|---|
| f(x) correct. | 1 |
| Loop with tolerance. | 1 |
| Sign test and interval update. | 2 |
| Return and stated root. | 1 |
[10] Class Time with object parameter. (10 marks)
| Step | Marks |
|---|---|
| Data members and both constructors. | 2 |
| accept( ). | 1 |
| addTime( ) with normalisation and new object. | 3 |
| longerThan( ). | 1 |
| display( ). | 1 |
| main( ) with two objects. | 1 |
| Documentation. | 1 |
Where students lose marks in Methods
The slips examiners see most often, and what to write instead.
Mistake: Passing objects incorrectly and creating extra objects
CISCE examiners' comments, 2025: on a method receiving two matrix objects, candidates 'Passed objects between methods/constructors incorrectly', 'Created a new array or three objects instead of two', and showed 'wrong understanding of its boolean return type'.
Do this: Access the parameters' members as A.mat[i][j]; create exactly the objects needed in main( ); use the boolean result in an if to print a message.
Usually costs: 2-3 marks.
Mistake: Not invoking methods inside other methods
CISCE examiners' 2025 report lists 'Invoking methods in another method (nested methods)' as difficult, and in 2024 candidates 'Did not invoke find() correctly in show()'.
Do this: When a method must use another, call it by name inside (find( ); or int c = countOne(num);) and use its result.
Usually costs: 1-2 marks.
Mistake: Misusing this and instance variables
The 2025 report lists 'Concept of this operator' and 'Use of a single instance variable for multiple operations in various functions' among confused concepts; candidates also showed 'Incorrect use of instance variables'.
Do this: Use this.x when a parameter hides field x; do not declare extra instance variables beyond those specified (use local variables instead).
Usually costs: 1 mark.
Mistake: Several Scanner objects on System.in
A new Scanner in every input method can lose input already buffered by an earlier Scanner (the Time program failed this way with piped input until it used one shared Scanner).
Do this: Create one Scanner (for example a static field) and reuse it.
Usually costs: Program may crash on testing.
Practice questions on Methods
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 · Very short answerBoard level
What is a method signature?
Hint
Name and parameters.
Answer
The method's name together with the number, types and order of its parameters.
Q2 · 1 mark · Very short answerBoard level
Can a static method use this?
Hint
No current object.
Answer
No.
Q3 · 1 mark · Very short answerBoard level
What does a void method return?
Hint
Nothing.
Answer
No value; it may use return; only to exit early.
Q4 · 1 mark · Very short answerHarder board level
A method void swap(int a, int b) exchanges a and b. Why does calling swap(x, y) not exchange x and y?
Hint
Copies.
Answer
Only copies of x and y are exchanged inside the method; the caller's variables are unchanged.
Q5 · 2 marks · Short answerHarder board level
[2] Write an accessor and a mutator for a private data member int marks.
Hint
get and set.
Answer
int getMarks() { return marks; } and void setMarks(int m) { marks = m; }
Q6 · 2 marks · Short answerHarder board level
[2] Overload a method volume for a cube (one int side) and a cuboid (three int sides), and give volume(3) and volume(2, 3, 4).
Hint
Different parameter counts.
Answer
int volume(int s) { return s * s * s; } and int volume(int l, int b, int h) { return l * b * h; } → 27 and 24.
Q7 · 5 marks · Long answerHOTS / competency
[5] Write a class Fraction with num and den, a constructor that reduces the fraction using a gcd method, and Fraction add(Fraction f) returning the reduced sum. Give 1/6 + 1/3.
Hint
a/b + c/d = (ad + bc)/bd.
Answer
Fraction(int n, int d) { int g = gcd(n, d); num = n / g; den = d / g; } int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } Fraction add(Fraction f) { return new Fraction(num * f.den + f.num * den, den * f.den); } 1/6 + 1/3 = (3 + 6)/18 = 9/18 = 1/2 (checked by running the code).
Q8 · 10 marks · Long answerHOTS / competency
[10] Design a class Prime with data member n; a constructor; void accept( ); static boolean isPrime(int x); int nextPrime( ) that returns the smallest prime greater than n by invoking isPrime( ); and void show( ). Write main( ). Give the output for n = 24 and n = 31.
Hint
Loop k = n + 1 upwards.
Answer
Constructor sets n = 0; accept( ) reads n; isPrime: false for x < 2, else test divisors d with d × d ≤ x; nextPrime: k = n + 1; while (!isPrime(k)) k++; return k; show( ) prints n and nextPrime( ); main( ) calls accept( ) and show( ). n = 24 → 29; n = 31 → 37 (checked by running the code).
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.What decides which overloaded method runs?Show answer
The number, types and order of the arguments.
2.Is Java call by value or by reference?Show answer
Call by value; for objects the value is the reference.
3.Who can call a static method without an object?Show answer
Any code, using ClassName.method( ).
4.this inside a.addTime(b)?Show answer
a.
5.Root of x³ - x - 2 = 0 in [1, 2]?Show answer
About 1.5214.
Best order to study it
- Method header parts, return types and overloading.
- Formal and actual arguments; primitives versus objects.
- Static methods and variables.
- this and methods taking or returning objects.
- Numerical algorithms split into methods (bisection, primes, gcd).
Quick revision checklist
The night before the exam: can you do each of these without looking?
- Method = named operation; signature = name + parameter list.
- Overloading: same name, different parameters (not just return type).
- Formal in header, actual in call; copied by value.
- Object argument: field changes visible; reassignment not.
- static: belongs to class; no this; cannot use instance members directly.
- this: current object; this.x = x; this(...) calls another constructor.
- Bisection: halve the interval keeping the sign change.
Methods: frequently asked questions
Is Java pass-by-reference for objects?
Technically no: Java passes a copy of the reference. That is why changing an object's fields inside a method is visible outside, but making the parameter refer to a new object is not. Many textbooks call this 'pass by reference'; at ISC level either explanation is accepted if the behaviour is described correctly.
Can main( ) call an instance method directly?
No. main( ) is static, so it must first create an object and call the method through it (ob.display( )).
Which root-finding methods are expected?
The syllabus mentions finding roots of algebraic equations as an example; the quadratic formula and simple iterative methods such as bisection are suitable.
Based on: CISCE ISC 2027 Computer Science (868) syllabus; CISCE ISC Computer Science (868) Paper 1 specimen question paper and answer key (latest specimen, 2025); CISCE Analysis of Pupil Performance, ISC Computer Science (868), 2025; CISCE Analysis of Pupil Performance, ISC Computer Science (868), 2024