★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
ICSE Class 10 · Computer Applications (Java) · Library classes 2027
Wrapper classes in ICSE Class 10 are a short chapter with a long reach: the same twelve methods turn up in one-mark MCQs, in output questions and inside almost every string program in Section B. This page lists all twelve as the 2027 syllabus names them, shows the exact value each returns (every one was run in Java 21, including the inputs that crash), explains autoboxing and unboxing with code, and works two class-design programs that depend on them. In our live mini batch these outputs are traced first and then checked in BlueJ.
Live online · all twelve listed methods · outputs from real Java · autoboxing in code · two Section B programs · first class free
Start here
Our BlueJ course for Classes 9 and 10 is where the twelve methods get used week after week. ISC Computer Science leans on Character and parse methods for its string and number questions, and Java for Teens suits a student who wants Java practice outside the board pattern.

The batch / ICSE CA
A small Class 9 and 10 group where every string program leans on Character tests and every record program on parseInt.
Open the course →
Next step / ISC
ISC Computer Science keeps these methods and puts them inside longer text and number problems, so the habit pays off twice.
Open the course →
Second language / Python
Python calls the same ideas int() and isdigit(); a good second language once the board paper is behind you.
Open the course →Ans. The short version
Wrapper classes in ICSE Class 10 are the library classes that wrap each primitive type in an object: Byte, Short, Integer, Long, Float, Double, Character and Boolean, all in java.lang. The 2027 syllabus lists twelve methods: parseInt, parseLong, parseFloat and parseDouble, which turn a String into a number, and the Character methods isDigit, isLetter, isLetterOrDigit, isLowerCase, isUpperCase, isWhitespace, toLowerCase and toUpperCase. Autoboxing converts a primitive to its wrapper automatically; unboxing does the reverse. Our live classes drill all of it in a small Tuesday and Wednesday evening group in India, with personalised one to one lessons for any family that needs another hour.
Q1. What are wrapper classes and library classes?
A wrapper class is a library class that stores one value of a primitive type inside an object and gives methods to work with it. A library class is a ready-made class that comes with Java, so a program can use it without writing it.
| Primitive type | Wrapper class | Spelling trap |
|---|---|---|
byte | Byte | Capital B |
short | Short | Capital S |
int | Integer | Not "Int": the full word |
long | Long | Capital L |
float | Float | Capital F |
double | Double | Capital D |
char | Character | Not "Char": the full word |
boolean | Boolean | Capital B |
java.lang, which every program imports automatically, so no import line is needed.int becomes Integer and char becomes Character. The other six only gain a capital letter.String is a library class too, but it is not a wrapper class: there is no primitive type called string.Primitive and composite types, which this chapter leans on, are defined on class as the basis of all computation, and the other big library class in the syllabus, Math, has its own page: Math library methods for ICSE Class 10.
Q2. What is autoboxing and unboxing?
Autoboxing is the automatic conversion of a primitive value into an object of its wrapper class; unboxing is the automatic conversion of a wrapper object back into its primitive value. Java does both by itself whenever one type is used where the other is expected.
Integer a = 25; // autoboxing: int 25 into an Integer int b = a + 5; // unboxing: a gives back 25 System.out.println(b); Double d = 4.5; // autoboxing double e = d * 2; // unboxing, then multiply System.out.println(e); Character c = 'k'; // autoboxing a char char ch = c; // unboxing System.out.println(Character.toUpperCase(ch)); Boolean flag = true; System.out.println(!flag); // Output 30 9.0 K false
No method is called for the conversion; the assignment alone does it. That is what "auto" means in an answer.
| Point | Autoboxing | Unboxing |
|---|---|---|
| Direction | Primitive to wrapper object | Wrapper object to primitive |
| Example | Integer a = 25; | int b = a; |
| Happens when | A primitive is stored where an object is expected | An object is used in arithmetic or stored in a primitive |
| Who does it | The Java compiler, automatically | The Java compiler, automatically |
Two methods outside the twelve on the syllabus list appear in some textbooks: Integer.valueOf("40") returns an Integer object (so Integer.valueOf("40") / 3 prints 13 after unboxing), and Integer.toString(70) returns the String "70". They are useful to recognise, but parseInt is the one to learn for the paper.
Q3. What does Integer.parseInt do, and what are the other parse methods?
Integer.parseInt(s) converts a String of digits into an int, so the value can be used in arithmetic. parseLong, parseFloat and parseDouble do the same for long, float and double. Every result below was printed by Java 21.
| Syllabus method | Code | Output | Note |
|---|---|---|---|
int parseInt(String s) | Integer.parseInt("472") + 8 | 480 | Converted, then added. Compare "472" + 8, which joins to 4728 |
Integer.parseInt("-35") * 2 | -70 | A leading minus sign is allowed | |
Integer.parseInt("007") | 7 | Leading zeros are dropped; the result is a number, not text | |
Integer.parseInt("12.5") | NumberFormatException | A decimal point is not allowed in an int | |
Integer.parseInt(" 42") | NumberFormatException | A space is not a digit: trim() first | |
long parseLong(String s) | Long.parseLong("9876543210") + 1 | 9876543211 | Too big for int, fine for long |
float parseFloat(String s) | Float.parseFloat("2.5") * 2 | 5.0 | A float result prints with a decimal point |
double parseDouble(String s) | Double.parseDouble("3") / 2 | 1.5 | "3" becomes 3.0, so the division is real |
Double.parseDouble("-7.25") | -7.25 | Sign and decimal point both accepted |
The exact message Java 21 printed for the bad input was java.lang.NumberFormatException: For input string: "12.5". An exam answer only needs the name: the program stops with a NumberFormatException because the String is not a valid int.
char dg = '8';
System.out.println(dg - '0' + 1);
System.out.println(Integer.parseInt("" + dg) + 1);
// Output
9
9
parseInt needs a String, so "" + dg turns the char into one first. Subtracting '0' gives the same value with char arithmetic.
Riya,78,91 read with nextLine().substring and must then be added or compared.Q4. Which Character class methods are in the ICSE syllabus?
Eight Character methods are listed: six tests that return boolean and two converters that return char. All are called on the class, as Character.isDigit(ch), never on a variable.
| Syllabus method | Code | Output | Note |
|---|---|---|---|
boolean isDigit(char ch) | Character.isDigit('7') + " " + Character.isDigit('x') | true false | Only 0 to 9 count |
boolean isLetter(char ch) | Character.isLetter('g') + " " + Character.isLetter('9') | true false | Either case counts as a letter |
boolean isLetterOrDigit(char ch) | Character.isLetterOrDigit('@') + " " + Character.isLetterOrDigit('Q') | false true | Symbols and spaces give false |
boolean isLowerCase(char ch) | Character.isLowerCase('b') + " " + Character.isLowerCase('B') + " " + Character.isLowerCase('5') | true false false | A digit is neither lower nor upper case |
boolean isUpperCase(char ch) | Character.isUpperCase('Z') + " " + Character.isUpperCase('#') | true false | Symbols are not upper case |
boolean isWhitespace(char ch) | Character.isWhitespace(' ') + " " + Character.isWhitespace('\n') + " " + Character.isWhitespace('_') | true true false | Space, tab and new line count; underscore does not |
char toLowerCase(char ch) | Character.toLowerCase('M') + " " + Character.toLowerCase('m') | m m | A lowercase letter comes back unchanged |
char toUpperCase(char ch) | Character.toUpperCase('#') | # | Anything that is not a letter comes back unchanged |
| Code | Output | Why |
|---|---|---|
System.out.println(Character.toUpperCase('a') + 1); | 66 | 'A' is code 65; a char plus an int is an int |
System.out.println((char) (Character.toUpperCase('a') + 1)); | B | The cast turns 66 back into a character |
System.out.println("" + Character.toUpperCase('a') + 1); | A1 | The empty String arrives first, so both values are joined |
String s = "Board 2027 Prep";
String t = "";
for (int i = 0; i < s.length(); i++) {
char x = s.charAt(i);
if (Character.isUpperCase(x))
t = t + Character.toLowerCase(x);
else if (Character.isLowerCase(x))
t = t + Character.toUpperCase(x);
else
t = t + x; // digits and spaces kept
}
System.out.println(t);
// Output: bOARD 2027 pREP
The final else matters: without it, the digits and spaces would be lost from the result.
is and answer a yes or no question, so they return boolean.to and hand back a changed character, so they return char.isWhitespace has a lower-case s in "space"; isLetterOrDigit has capital O and D.These eight methods do most of the work in sentence programs, which are collected on ICSE Class 10 string programs, and longer fragments to trace, sorted by trap, sit on the output questions page.
Q5. How do wrapper methods appear in Section B?
Section B rarely says "use wrapper classes". It asks you to classify characters or to pull numbers out of text, and the Character tests and parseInt are the tools that make the answer short. Both questions below are original and set in the class-design format.
Question 1. Define a class CharCensus with data members text (String) and upper, lower, digits, spaces, others (int). Write a default constructor to initialise them, void accept() to read a sentence, void count() to count the uppercase letters, lowercase letters, digits, whitespace characters and other characters using Character class methods, and void display(). In main, make one object and invoke the three methods in order.
import java.util.Scanner;
class CharCensus {
String text; // the sentence entered
int upper; // uppercase letters
int lower; // lowercase letters
int digits; // digit characters
int spaces; // whitespace characters
int others; // everything else
CharCensus() { // default constructor
text = "";
upper = 0;
lower = 0;
digits = 0;
spaces = 0;
others = 0;
}
void accept() {
Scanner sc = new Scanner(System.in);
System.out.println("Enter a sentence:");
text = sc.nextLine();
}
void count() {
for (int i = 0; i < text.length(); i++) {
char ch = text.charAt(i);
if (Character.isUpperCase(ch))
upper++;
else if (Character.isLowerCase(ch))
lower++;
else if (Character.isDigit(ch))
digits++;
else if (Character.isWhitespace(ch))
spaces++;
else
others++;
}
}
void display() {
System.out.println("Uppercase letters : " + upper);
System.out.println("Lowercase letters : " + lower);
System.out.println("Digits : " + digits);
System.out.println("Spaces : " + spaces);
System.out.println("Other characters : " + others);
}
public static void main(String args[]) {
CharCensus ob = new CharCensus();
ob.accept();
ob.count();
ob.display();
}
}
One if-else-if chain means each character is counted exactly once. The final else catches commas, colons and every other symbol.
| Variable | Type | Purpose |
|---|---|---|
| text | String | the sentence entered |
| upper, lower | int | counts of uppercase and lowercase letters |
| digits | int | count of digit characters |
| spaces | int | count of whitespace characters |
| others | int | count of all remaining characters |
| ch | char | the character being tested |
| i | int | loop counter over the sentence |
| ob | CharCensus | the object created in main |
Enter a sentence: ICSE Exam on 17 March, 2027: Room B-12! Uppercase letters : 8 Lowercase letters : 12 Digits : 8 Spaces : 7 Other characters : 4
The four others are the comma, the colon, the hyphen and the exclamation mark. 8 + 12 + 8 + 7 + 4 is 39, the length of the sentence.
Question 2. A record is typed as a name followed by marks, separated by commas, for example Riya,78,91,66,84. Define a class MarksLine with data members line, name (String) and total, count, high (int). Write a parameterized constructor MarksLine(String l) to store the record and initialise the other members, void extract() to separate the name and convert each mark with Integer.parseInt(), and void display() to print the name, the number of marks, the total, the highest mark and the average to one decimal place.
import java.util.Scanner;
class MarksLine {
String line; // the record, for example Riya,78,91,66
String name; // the part before the first comma
int total; // sum of the marks
int count; // number of marks found
int high; // highest mark
MarksLine(String l) { // parameterized constructor
line = l.trim() + ","; // a comma at the end closes the last part
name = "";
total = 0;
count = 0;
high = 0;
}
void extract() {
String part = "";
for (int i = 0; i < line.length(); i++) {
char ch = line.charAt(i);
if (ch != ',') {
part = part + ch;
} else {
if (name.equals(""))
name = part; // first part is the name
else {
int m = Integer.parseInt(part.trim()); // text to int
total = total + m;
count++;
if (m > high)
high = m;
}
part = "";
}
}
}
void display() {
double avg = (double) total / count;
System.out.println("Name : " + name);
System.out.println("Marks : " + count);
System.out.println("Total : " + total);
System.out.println("Highest : " + high);
System.out.println("Average : " + Math.round(avg * 10) / 10.0);
}
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter name and marks separated by commas:");
String s = sc.nextLine();
MarksLine ob = new MarksLine(s);
ob.extract();
ob.display();
}
}
part.trim() before parseInt is what lets the record contain a space after a comma; without it the program stops with a NumberFormatException.
| Variable | Type | Purpose |
|---|---|---|
| line | String | the record with a closing comma added |
| name | String | the student's name |
| total, count, high | int | sum, number and highest of the marks |
| l | String | constructor parameter: the record |
| part | String | the piece being built between commas |
| m | int | one mark, converted by parseInt |
| avg | double | average of the marks |
| s, sc, ob | String, Scanner, MarksLine | input line, keyboard reader, the object |
Enter name and marks separated by commas: Riya,78, 91,66,84 Name : Riya Marks : 4 Total : 319 Highest : 91 Average : 79.8 Enter name and marks separated by commas: Kabir,55,60 Name : Kabir Marks : 2 Total : 115 Highest : 60 Average : 57.5
319 / 4 is 79.75; Math.round(797.5) is 798, so one decimal place gives 79.8. The space before 91 in the first run is handled by trim.
The constructor rules both programs rely on are on constructors ICSE Class 10 questions, and every other kind of Section B program is gathered in the Java programs practice hub.
Q6. What do Section A wrapper class questions look like, and how are they taught?
Original questions in the shapes of Question 1 and Question 2. Answer each on paper, then open it.
char.
Character.isLetterOrDigit('$')
Character.toUpperCase(ch)?
Integer n = 45;.System.out.println(Integer.parseInt("15") + Integer.parseInt("5") + "0");
s = "62.5" into a double.
double d = Double.parseDouble(s);Integer.parseInt throws an exception.
Tuesday evening (5:30 PM IST) opens with every student writing all twelve signatures from memory, return type first, and the group checks spelling and case together.
Fragments like the tables above get a written answer first; then the mentor types each into BlueJ, and 66 against B settles itself in front of everyone.
Wednesday evening (8:00 PM IST) is for one sentence or record program, written by hand with its variable description table, marked against the scheme on screen, then typed and tested with awkward input.
Wrapper questions return inside full two-hour papers, marked like the board, with every lost mark discussed in doubt time.
More one-mark questions across every chapter are on ICSE Computer Applications MCQ questions.
Batch or personalised: you choose
The method tables, the traced outputs and the two programs are taught the same way in both formats. Families in India choose between the small evening group and private lessons; for ICSE students living abroad the classes are always private. Billing is monthly, with no admission fee.
Option 1 · Fixed batch timings
₹2,999
per month, two live classes a week
Option 2 · Choose your own timing
₹4,999
per month, one private class a weektwo private classes a week, at a time set with you
Outside India: the ICSE Computer Applications course runs as personalised one to one, two private classes a week at a time set in your own time zone. The mini batch is taught for families in India.
A student who mostly confuses return types, or writes Int and Char for the class names, often needs only a few one to one sessions. A student who also needs steady practice on whole Section B programs gets more from the two batch evenings each week. Fees appear in your own currency.
Studying outside India?
An ICSE school in the Gulf or South East Asia sits the very paper a school in Kolkata sits, twelve methods included. Abroad, every lesson is private and lands at an early evening hour by the local clock.
| Where you live | Time difference | Usual class window, local time | Format |
|---|---|---|---|
| India (IST) every Indian city | IST | Tue 5:30 PM, Wed 8:00 PM | Mini batch or 1-on-1 |
| United Arab Emirates Dubai, Sharjah | 1 h 30 min behind India | 3:00 PM to 9:00 PM | Personalised 1-on-1 |
| Indonesia and Thailand West Java, Bangkok area | 1 h 30 min ahead of India | 3:30 PM to 9:00 PM | Personalised 1-on-1 |
| Singapore Singapore | 2 h 30 min ahead of India | 3:30 PM to 9:00 PM | Personalised 1-on-1 |
The time is agreed after the free demo and can shift around school tests. For how the classes run for families abroad, see ICSE Computer Applications classes in the Gulf and abroad.
What families say
Real reviews from real families. We neither write nor commission them.
★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
★★★★★
"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."
Samriddha Mondal
Student
★★★★★
"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."
Vansh Agarwal
Student
★★★★★
"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."
Sonam Oswal
Parent of Dhairya
★★★★★
"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."
Sonu Goyal
Parent
★★★★★
"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."
Ritu Kedia
Parent
The rest of the Class 10 series
Every page in the ICSE Class 10 Computer Applications series, grouped by what you need: classes, each chapter, Section B programs, question practice, notes and revision, and the exam itself.
CBSE Class 10 AI (417): The Mon and Wed 9 PM AI batch CBSE AI 417 syllabus explained CBSE AI important questions Sample paper and mock tests
Questions about wrapper classes
Wrapper classes are library classes that hold a primitive value inside an object and provide methods for it. There is one for each primitive type: Byte, Short, Integer, Long, Float, Double, Character and Boolean. They are in java.lang, so no import is needed.
Library classes are ready-made classes supplied with Java, grouped into packages, which a program can use without writing them. For ICSE Class 10 the ones that matter are the wrapper classes, Math, String and Scanner. The Library classes chapter itself covers the wrapper classes and autoboxing.
Autoboxing is Java automatically converting a primitive value into an object of its wrapper class, as in Integer n = 45. Unboxing is the reverse, an Integer object automatically giving back its int, as in int k = n + 1. No method call is written for either.
Integer.parseInt(String s) converts a String containing a whole number into an int, so it can be used in arithmetic. Integer.parseInt("472") + 8 gives 480, while "472" + 8 gives 4728. If the String is not a valid whole number, such as "12.5", the program stops with a NumberFormatException.
Eight: isDigit, isLetter, isLetterOrDigit, isLowerCase, isUpperCase and isWhitespace, which return boolean, and toLowerCase and toUpperCase, which return char. Each takes one char and is called on the class, as in Character.isDigit(ch).
The syllabus lists twelve: parseInt, parseLong, parseFloat and parseDouble, and the eight Character methods isDigit, isLetter, isLetterOrDigit, isLowerCase, isUpperCase, isWhitespace, toLowerCase and toUpperCase. Learn each one's return type as well as what it does.
toUpperCase returns the char A, whose code is 65. Adding the int 1 to a char gives an int, so 66 is printed. To print the letter B, cast the result back: (char) (Character.toUpperCase('a') + 1).
No. String is a library class in java.lang, but it is not a wrapper class, because there is no primitive type called string for it to wrap. The eight wrapper classes match the eight primitive types exactly.
int is a primitive type that stores a whole number directly. Integer is a wrapper class whose object holds an int and offers methods such as parseInt. Java converts between them automatically through autoboxing and unboxing.
Yes. The small group meets twice a week, 5:30 PM IST on Tuesday and 8:00 PM IST on Wednesday; the twelve methods are recalled, their outputs predicted, and Character and parseInt programs written and checked in BlueJ. If those evenings clash with school, personalised one to one lessons go at a time you pick.
Start
In the free demo your child predicts the output of a handful of parse and Character method calls, sees each run in BlueJ, then starts a short sentence program with the mentor. Afterwards the mentor tells you plainly which methods your child already owns, which need work, and which format fits.
Want the wider view first? See ICSE Computer Applications important questions or the ICSE Class 10 Java classes.
WhatsApp us · +91 91233 66161 · connect@modernagecoders.com
Every class is live video. The form requests a callback and reserves nothing.
A full live class of about 45 to 60 minutes at a slot you pick, with a written skill report and learning roadmap on WhatsApp afterwards. The fee is adjusted against your first month if you enrol.
Book a priority demo