Objects and Classes, Input and Tokens: ISC Class 12 Computer Science
Updated 15 October 2026 · Fact-checked
An object bundles data (attributes) with behaviour (methods), and a class is the blueprint from which objects are created. ISC Class 12 covers constructors, real-world modelling with classes, input and output with Scanner and print classes, input/output exceptions, and splitting input into tokens with StringTokenizer.
What Objects is about
The syllabus for Objects asks for:
(a) Objects as data (attributes) + behaviour (methods); an object as an instance of a class; constructors.
(b) Analysis of real-world programming examples in terms of objects and classes.
(c) Basic input/output using Scanner and printer classes from the JDK; input/output exceptions; tokens in an input stream, whitespace, and extracting tokens with the StringTokenizer class.
Every Section B program in Paper 1 is a class with data members, a constructor and methods, so this chapter underlies most of the paper. Part I includes one-mark questions on the this keyword, instance versus class variables and constructors.
All programs on this page were compiled and run; the outputs shown are exactly what they print.
Weightage: CISCE publishes no chapter or unit weightage for ISC Computer Science. Objects is part of Section B, 5 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
- Objects and classes
Object: a software entity with state (data, held in data members or attributes) and behaviour (methods that act on the data). Example: a bank account object has holder name and balance (state) and can deposit, withdraw and show (behaviour).
Class: a blueprint or template that defines the data members and methods common to all objects of a kind. An object is an instance of a class, created with new:
Account a = new Account("Riya", 5000);
Here a is a reference variable that refers to the object stored in memory.Members:
- Instance variables: declared in the class without static; each object has its own copy (holder, balance).
- Class (static) variables: declared static; one copy shared by all objects; accessed as ClassName.variable (Account.count).
- Instance methods act on a particular object (a.deposit(1500)); static methods belong to the class.
Why objects: they model real-world things, keep data and the code that uses it together (encapsulation), hide details behind methods, and let classes be reused.
Worked example
[1] A class Student declares static int total; and int marks;. If 40 Student objects have been created, how many copies of total and of marks exist in memory? (Understand)
Try it first, then show the solutionSolution
- total is a class (static) variable: one copy shared by all objects; marks is an instance variable: one copy per object, so 40 copies - 1 mark.
Answer: One copy of total (shared by every object and accessed as Student.total) and 40 copies of marks (one inside each object).
- Constructors and the this keyword
A constructor is a special method that initialises a new object. It:
1. has the same name as the class;
2. has no return type (not even void);
3. is called automatically when the object is created with new.Types:
- Default (non-parameterised) constructor: takes no arguments; if you write no constructor, Java supplies one that sets fields to default values (0, 0.0, false, null).
- Parameterised constructor: takes arguments to set initial values.
- Constructor overloading: several constructors with different parameter lists in the same class.
this: a reference to the current object (the object whose method or constructor is running). Uses:
1. To distinguish a data member from a parameter with the same name: this.balance = balance;
2. To call another constructor of the same class: this("Unknown", 0.0); (must be the first statement).
3. To pass the current object as an argument or return it.
this can be used in any instance method, not only constructors; it cannot be used in a static method.// An object = data (attributes) + behaviour (methods). // Shows instance variables, a class (static) variable, overloaded constructors and this. public class Account { String holder; // instance variable: one copy per object double balance; // instance variable static int count = 0; // class variable: one copy shared by all objects Account() // default constructor { this("Unknown", 0.0); // calls the parameterised constructor } Account(String holder, double balance) // parameterised constructor { this.holder = holder; // this.holder is the data member; holder is the parameter this.balance = balance; count++; } void deposit(double amt) { balance = balance + amt; } boolean withdraw(double amt) { if (amt > balance) return false; balance = balance - amt; return true; } void show() { System.out.println(holder + " : " + balance); } public static void main(String[] args) { Account a = new Account("Riya", 5000); Account b = new Account(); a.deposit(1500); boolean ok = b.withdraw(200); a.show(); b.show(); System.out.println("Withdrawal from b allowed? " + ok); System.out.println("Accounts created: " + Account.count); } }Output:
Riya : 6500.0 Unknown : 0.0 Withdrawal from b allowed? false Accounts created: 2Both objects increase the shared counter, so count is 2; b was created through the default constructor, which calls the parameterised one with this(...).
Worked example
[2] Give two differences between a constructor and a method. (Understand)
Try it first, then show the solutionSolution
- A constructor has the class's name and no return type; a method has its own name and a return type (or void) - 1 mark.
- A constructor runs automatically once when the object is created; a method runs only when called, any number of times - 1 mark.
Answer: A constructor has the same name as the class and no return type, and it is invoked automatically when an object is created with new. A method has its own name and a return type (or void), and runs only when it is called, as often as needed.
- Analysing real-world problems with objects
To design a class from a description:
1. Identify the nouns that describe the thing and its properties: these become data members (Book: title, author, price, copies).
2. Identify the actions: these become methods (issue, returnBook, display).
3. Decide constructors: what must be known when an object is created.
4. Decide what is common to all objects (static) and what differs (instance).
5. Keep data private where possible and provide methods to use it.Examples:
Real-world thing Data members Methods Student roll, name, marks[ ] input( ), average( ), grade( ) Library book title, author, copies issue( ), returnBook( ), display( ) Bank account holder, balance deposit( ), withdraw( ), show( ) Train ticket from, to, distance, class fare( ), print( ) ISC Section B questions do this for you: they give the class name, data members and methods. Your job is to implement them exactly.
Worked example
[2] Identify suitable data members and methods for a class Ticket that calculates a bus fare from distance and passenger age. (Create)
Try it first, then show the solutionSolution
- Data members: name, age, distance, fare - 1 mark.
- Methods: Ticket( ) constructor, accept( ), calculate( ) (applying any concession by age), display( ) - 1 mark.
Answer: Data members: String name; int age; double distance, fare. Methods: a constructor, accept( ) to read details, calculate( ) to compute the fare with any age concession, and display( ) to print the ticket.
- Input and output: Scanner, print classes and exceptions
Scanner (java.util.Scanner) reads tokens from an input source such as the keyboard (System.in).
Common methods: nextInt( ), nextLong( ), nextDouble( ), nextBoolean( ), next( ) (one word), nextLine( ) (rest of the line), hasNextInt( ) and hasNext( ) (check before reading).
Note: after nextInt( ), the newline remains in the input; a following nextLine( ) returns an empty string unless an extra nextLine( ) is called.Output: System.out is a PrintStream with print( ), println( ) and printf( ). A PrintWriter can wrap System.out (or a file) and offers the same methods; with autoflush set to true, println( ) flushes the output.
Input/output exceptions:
- InputMismatchException: the next token does not match the type requested (typing 'seventeen' for nextInt( )).
- NoSuchElementException: no more input.
- IOException: a checked exception for failures in input/output (for example with BufferedReader or files); it must be caught or declared with throws.
Handling: put risky code in try, handle in catch; finally runs in either case.
import java.io.PrintWriter; import java.util.InputMismatchException; import java.util.Scanner; // Reads an integer safely: a non-numeric token causes InputMismatchException, which is caught. // Output goes through a PrintWriter wrapped around System.out. public class SafeInput { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out, true); // true: flush after println int age = -1; while (age < 0) { out.println("Enter your age:"); try { age = sc.nextInt(); } catch (InputMismatchException e) { String bad = sc.next(); // remove the bad token from the stream out.println("'" + bad + "' is not a whole number. Try again."); } } out.println("Age accepted: " + age); } }Input: seventeen, then 17
Enter your age: 'seventeen' is not a whole number. Try again. Enter your age: Age accepted: 17Worked example
[2] What happens if a user types 'twelve' when a program calls sc.nextInt( ), and how can the program recover? (Analyse)
Try it first, then show the solutionSolution
- nextInt( ) throws InputMismatchException because the token is not an integer - 1 mark.
- Catch it in a try-catch block, discard the bad token with sc.next( ), and ask again (or check with hasNextInt( ) first) - 1 mark.
Answer: nextInt( ) throws an InputMismatchException. The program can catch it, remove the bad token with sc.next( ) and prompt again, or test sc.hasNextInt( ) before reading.
- Tokens, whitespace and StringTokenizer
A token is a meaningful unit of input separated from others by delimiters. By default the delimiters are whitespace: spaces, tabs and newlines. Scanner's next( ) returns the next whitespace-separated token.
StringTokenizer (java.util.StringTokenizer) splits a string into tokens:
- new StringTokenizer(str) uses whitespace as delimiters.
- new StringTokenizer(str, " ,.") uses the given characters as delimiters.
- countTokens( ): number of tokens remaining.
- hasMoreTokens( ): true if tokens remain.
- nextToken( ): returns the next token.
Delimiters themselves are not returned (unless a third argument true is given), and consecutive delimiters do not produce empty tokens.
import java.util.Scanner; import java.util.StringTokenizer; // Reads a sentence and uses StringTokenizer to count words and find the longest word. public class WordStats { String sent; WordStats() { sent = ""; } void accept() { Scanner sc = new Scanner(System.in); System.out.println("Enter a sentence:"); sent = sc.nextLine(); } void analyse() { StringTokenizer st = new StringTokenizer(sent, " ,.?!"); // space and punctuation are delimiters int words = st.countTokens(); String longest = ""; while (st.hasMoreTokens()) { String w = st.nextToken(); if (w.length() > longest.length()) longest = w; } System.out.println("Number of words: " + words); System.out.println("Longest word: " + longest); } public static void main(String[] args) { WordStats ob = new WordStats(); ob.accept(); ob.analyse(); } }Input: Java runs anywhere, thanks to bytecode and the JVM.
Enter a sentence: Number of words: 9 Longest word: anywhereThe comma and full stop are delimiters, so 'anywhere' and 'JVM' come out clean. 'anywhere' and 'bytecode' both have 8 letters; the strict > comparison keeps the first one found.
Worked example
[2] How many tokens does new StringTokenizer("a,b,,c d", ", ") produce, and what are they? (Apply)
Try it first, then show the solutionSolution
- Delimiters are comma and space; consecutive delimiters (,,) do not create empty tokens - 1 mark.
- Tokens: a, b, c, d → countTokens( ) = 4 - 1 mark.
Answer: Four tokens: a, b, c and d.
Objects 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 and object
Imagine an architect's house plan used to build three houses in different colours on different plots.
Which is the class and which are the objects?
Try it first, then show the solutionSolution
- The plan defines rooms and features common to all: the class.
- Each built house with its own colour and address is an object (instance).
Answer: The plan is the class; each house is an object with its own state (colour, address) built from it.
Memory hook: One blueprint, many houses.
Static (class) variable
Suppose every student object records its own marks, but the school wants one counter of how many student records exist.
How should the counter be declared?
Try it first, then show the solutionSolution
- Marks differ per student: instance variables.
- One shared total: a static variable increased in the constructor.
Answer: Declare static int count; and increase it in the constructor, as Account.count does; every object shares that one counter.
Memory hook: Static is shared; instance is personal.
Tokenising
Imagine a voice assistant that hears 'Set alarm, 6 am, Monday' and must pick out the command and its details.
How does tokenising help?
Try it first, then show the solutionSolution
- Using spaces and commas as delimiters splits the sentence into tokens: Set, alarm, 6, am, Monday.
- Each token can then be examined separately.
Answer: Splitting the input into tokens with suitable delimiters lets the program identify the command and its parameters one at a time, just as StringTokenizer does.
Memory hook: Break the sentence to understand it.
Topics in this chapter
Objects: syntax and key facts
- Creating an object
- ClassName ref = new ClassName(arguments);
- new allocates memory and calls the constructor.
- Constructor rules
- Same name as class; no return type; runs automatically
- Can be overloaded.
- this
- this.member = parameter; this(args) as first statement
- Refers to the current object.
- Scanner methods
- nextInt( ), nextDouble( ), next( ), nextLine( ), hasNextInt( )
- InputMismatchException on wrong type.
- StringTokenizer
- new StringTokenizer(s, delims); countTokens( ); hasMoreTokens( ); nextToken( )
- Default delimiters are whitespace.
How the board asks Objects
The question patterns to expect, and the method that works for each.
| Question type | How it is asked | Method |
|---|---|---|
| Part I one-mark items | Statements about this; instance versus class variable; constructor properties; which exception occurs. | Check each statement against the precise rule (for example this is not limited to constructors). |
| Section B class implementation [10] | Every Section B question: data members, constructor, methods and main( ). | Initialise all members in the constructor; use this when parameter names match field names. |
| String and token problems | Count words, find longest word, reverse each word, using StringTokenizer or split. | Choose delimiters carefully; loop with hasMoreTokens( ). |
| Short answers [2] | Difference between constructor and method; uses of this; purpose of a default constructor. | Two clear points. |
Tricks to remember Objects
Short memory aids. Say each one aloud once, then use it on a question the same day.
Object = State + Behaviour
S + B: what it has, what it does.
Use it when: Definition of object.
Constructor 'SNA'
Same name, No return type, Automatic call.
Use it when: Constructor rules.
Tokenizer trio
count, has, next: countTokens, hasMoreTokens, nextToken.
Use it when: StringTokenizer methods.
Objects: board-level solved questions
Ordered from board level to HOTS. Cover the solution, write your own, then compare step by step.
Example 1: Statements about this · 1 mark · MCQBoard level
Consider:
class Box { double side; Box(double side) { this.side = side; } double volume() { return this.side * side * side; } }
Which statements are valid?
I. Inside volume( ), side and this.side refer to the same data member.
II. Inside the constructor, side on its own refers to the parameter.
III. this could also be used inside a static method of Box.
(a) I and II only
(b) II and III only
(c) I and III only
(d) I, II and III
Try it first, then show the solutionSolution
- I is true: volume( ) has no parameter called side, so side means the data member, the same as this.side. II is true: the parameter hides the field, which is why this.side is needed.
- III is false: a static method has no current object, so this cannot be used there. new Box(3).volume( ) returns 27.0 (checked by running the code).
Answer: (a) I and II only.
Example 2: Default constructor · 1 mark · Very short answerBoard level
What values do an int, a double, a boolean and a String data member receive if a class has no constructor?
Try it first, then show the solutionSolution
- Java supplies a default constructor that leaves fields at their default values.
- Numeric 0 or 0.0, boolean false, references null.
Answer: 0, 0.0, false and null.
Example 3: Assertion-reason: static · 1 mark · Assertion-reasonHarder board level
Assertion (A): A static variable can be accessed using the class name without creating an object.
Reason (R): A static variable belongs to the class and is shared by all its objects.
(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
- Account.count is used in main( ) without an object: A is true.
- Because it belongs to the class, not to an object: R explains A.
Answer: (a) Both A and R are true and R is the correct explanation of A.
Example 4: Output of Account · 2 marks · Short answerHarder board level
[2] In the Account program above, what is printed for b, and why is 'Accounts created' equal to 2? (Analyse)
Try it first, then show the solutionSolution
- b is created by the default constructor, which calls this("Unknown", 0.0); withdraw(200) fails since 200 > 0, so b shows 'Unknown : 0.0'.
- Each object's creation runs the parameterised constructor once, increasing the shared static count: 2 objects → 2.
Answer: b prints 'Unknown : 0.0' (the withdrawal is refused), and count is 2 because the shared static counter is increased once for each of the two objects.
Example 5: Word statistics class · 10 marks · Long answerHOTS / competency
[10] Design a class WordStats with a data member sent (a sentence); a constructor; void accept( ) to read the sentence; and void analyse( ) that uses StringTokenizer (with space and punctuation as delimiters) to print the number of words and the longest word. Write main( ) and give the output for 'Java runs anywhere, thanks to bytecode and the JVM.' (Create)
Try it first, then show the solutionSolution
- Data member String sent; constructor sets sent = "".
- accept( ): Scanner, nextLine( ) to read the whole sentence.
- analyse( ): StringTokenizer st = new StringTokenizer(sent, " ,.?!"); words = st.countTokens( ) before any token is taken.
- Loop while st.hasMoreTokens( ): w = st.nextToken( ); if w is longer than longest, replace it.
- Print the count and the longest word.
- main( ): create the object and call accept( ) and analyse( ). Output: Number of words: 9; Longest word: anywhere.
Answer: See the compiled WordStats program; for the given sentence it prints 'Number of words: 9' and 'Longest word: anywhere'.
Example 6: nextInt and nextLine · 2 marks · Short answerHOTS / competency
[2] A program reads int n = sc.nextInt(); String name = sc.nextLine(); and the user types 21, presses Enter, then types Asha. Why is name empty, and how is it fixed? (Evaluate)
Try it first, then show the solutionSolution
- nextInt( ) reads 21 but leaves the newline in the input; nextLine( ) then reads up to that newline and returns an empty string.
- Add an extra sc.nextLine( ) after nextInt( ) to consume the newline (or read the number with nextLine( ) and convert with Integer.parseInt).
Answer: The leftover newline is consumed by nextLine( ), giving "". Call sc.nextLine( ) once more after nextInt( ) before reading the name.
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 1 + 2 + 2 + 1 marks.
Library book class (case-based)
A library wants a class Book with title, author and copies available, a shared count of all Book objects, a constructor taking title, author and copies, and methods issue( ) (reduce copies if any are available) and show( ).
(i) · 1 mark
Which data member should be static and why?
Answer
Answer: The count of Book objects, because one value is shared by all books.
1 mark.
(ii) · 2 marks
Write the constructor using this.
Answer
Answer: Book(String title, String author, int copies) { this.title = title; this.author = author; this.copies = copies; count++; }
1 for this usage, 1 for count.
(iii) · 2 marks
Write issue( ) returning true if a copy was issued.
Answer
Answer: boolean issue() { if (copies > 0) { copies--; return true; } return false; }
1 for the check, 1 for update and return.
(iv) · 1 mark
If three books are created and two copies of one are issued, what is count?
Answer
Answer: 3 (issuing copies does not create objects).
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] Two differences between a constructor and a method. (2 marks)
| Step | Marks |
|---|---|
| Name and return type. | 1 |
| Automatic invocation on object creation. | 1 |
[5] Class Counter with instance and static variables. (5 marks)
| Step | Marks |
|---|---|
| Correct declarations (instance and static). | 1 |
| click( ) updates both. | 1 |
| Objects created and methods called. | 1 |
| Correct final values with reason. | 2 |
[10] Class WordStats. (10 marks)
| Step | Marks |
|---|---|
| Data member and constructor. | 1 |
| accept( ) with nextLine( ). | 1 |
| StringTokenizer with suitable delimiters. | 2 |
| Counting words. | 2 |
| Finding the longest word. | 2 |
| main( ). | 1 |
| Documentation. | 1 |
Where students lose marks in Objects
The slips examiners see most often, and what to write instead.
Mistake: Vague difference between instance and class variables
CISCE examiners' comments, 2024: candidates 'Gave vague explanation of difference between static and non-static variables'; the expected answer was a separate copy per object versus a single shared copy, referred to by object name or class name.
Do this: State: instance = one copy per object (object.name); static = one shared copy (ClassName.name).
Usually costs: 1 mark.
Mistake: Choosing wrong combinations in 'which statements are valid' items
CISCE examiners' comments, 2025: on statements about this, candidates were 'Confused by the combinations of statements and chose wrong option'.
Do this: Mark each statement true or false separately first, then pick the option that lists exactly the true ones.
Usually costs: 1 mark.
Mistake: Constructor with a return type, or not initialising all members
A constructor with void is no longer a constructor; Section B marks require every data member to receive a legal initial value.
Do this: No return type; initialise every member (0, "", null-safe values, or as the question says).
Usually costs: 1 mark.
Mistake: Losing input after nextInt( )
The leftover newline makes the next nextLine( ) return an empty string.
Do this: Insert an extra sc.nextLine( ) after reading a number when a full line is read next.
Usually costs: Wrong program behaviour.
Practice questions on Objects
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 an object?
Hint
State and behaviour.
Answer
An instance of a class that has its own state (data members) and behaviour (methods).
Q2 · 1 mark · Very short answerBoard level
Which keyword creates an object?
Hint
Allocates memory.
Answer
new
Q3 · 1 mark · Very short answerBoard level
Name the package that contains Scanner and StringTokenizer.
Hint
Utilities.
Answer
java.util
Q4 · 1 mark · Very short answerHarder board level
Can a constructor be declared with return type void? What happens?
Hint
It stops being a constructor.
Answer
If void is added, it becomes an ordinary method that happens to have the class's name and is not called automatically by new; if the class has no other constructor, Java supplies the default one.
Q5 · 2 marks · Short answerHarder board level
[2] What is constructor overloading? Give an example of two constructors for a class Point.
Hint
Different parameter lists.
Answer
Having more than one constructor with different parameter lists. Point() { x = 0; y = 0; } and Point(int x, int y) { this.x = x; this.y = y; }
Q6 · 2 marks · Short answerHarder board level
[2] Write code using StringTokenizer to print each word of a sentence s on a new line.
Hint
while hasMoreTokens.
Answer
StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) System.out.println(st.nextToken());
Q7 · 5 marks · Long answerHOTS / competency
[5] Write a class Counter with an instance variable clicks and a static variable total; a method click( ) that increases both. Create two objects, call click( ) twice on the first and once on the second, and state the values printed.
Hint
Shared versus own.
Answer
class Counter { int clicks; static int total; void click() { clicks++; total++; } } After c1.click(); c1.click(); c2.click(); the values are c1.clicks = 2, c2.clicks = 1, Counter.total = 3 (checked by running the code).
Q8 · 10 marks · Long answerHOTS / competency
[10] Design a class Initials with data member name; a constructor; void accept( ); and void make( ) that uses StringTokenizer to print the initials of all words except the last, followed by the last word in full (for 'Mohandas Karamchand Gandhi' print 'M. K. Gandhi'). Write main( ).
Hint
Count tokens first.
Answer
Constructor sets name = ""; accept( ) reads the full name with nextLine( ); make( ): StringTokenizer st = new StringTokenizer(name); int n = st.countTokens(); for (int i = 1; i < n; i++) result += st.nextToken().charAt(0) + ". "; result += st.nextToken(); print result; main( ) creates the object and calls accept( ) and make( ). For 'Mohandas Karamchand Gandhi' it prints 'M. K. Gandhi' (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.Two features of a constructor?Show answer
Same name as the class; no return type (and it runs automatically).
2.What does this refer to?Show answer
The current object.
3.Exception for a wrong input type with Scanner?Show answer
InputMismatchException.
4.Default delimiters of StringTokenizer?Show answer
Whitespace (space, tab, newline and similar).
5.How is a static variable accessed?Show answer
Through the class name, e.g. Account.count.
Best order to study it
- Objects, classes, instance and class members.
- Constructors (default, parameterised, overloaded) and this.
- Designing classes from real-world descriptions.
- Scanner input, print output and input exceptions.
- Tokens and StringTokenizer.
Quick revision checklist
The night before the exam: can you do each of these without looking?
- Object = state (data members) + behaviour (methods); instance of a class.
- Instance variable: per object. Static variable: shared, ClassName.var.
- Constructor: class name, no return type, automatic; overloading allowed.
- this: current object; this.x = x; this(...) first statement.
- Scanner: nextInt, nextDouble, next, nextLine, hasNextInt.
- InputMismatchException; IOException is checked.
- StringTokenizer(s, delims): countTokens, hasMoreTokens, nextToken.
Objects: frequently asked questions
Can I use String.split( ) instead of StringTokenizer?
split( ) is acceptable in programs, but the syllabus names StringTokenizer, so know its methods for theory questions; note that split( ) can produce empty strings for consecutive delimiters while StringTokenizer does not.
What does 'Printer classes' in the syllabus mean?
The JDK classes used for output: System.out is a PrintStream, and PrintWriter offers the same print, println and printf methods for the console or files.
Do I need try-catch in Section B programs?
Not usually. Scanner methods throw only unchecked exceptions, so no try-catch is required. If you use BufferedReader, you must handle or declare IOException (for example main(...) throws IOException).
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