ICSE Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type Notes and Important Questions with Answers

Computer Applications Concept Notes for Class 10: Chapter 05 Class as User-Defined Data Type

Review targeted revision notes for Class 10 Computer Applications with the ICSE Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type Notes and Important Questions with Answers. Built according to official educational guidelines for the 2026-27 academic year, these downloadable summaries for Chapter 05 Class as User-Defined Data Type support daily study and last-minute exam readiness.

Download Chapter 05 Class as User-Defined Data Type Revision Notes PDF

View or download the dedicated Chapter 05 Class as User-Defined Data Type revision resource below. Engaging with these structured concept notes daily ensures continuous academic progress and mastery of the 2026-27 curriculum for Computer Applications.

These ICSE Class 10 Computer Applications notes on Class as User-Defined Data Type cover key terms with 23 solved questions. They explain composite and user-defined datatypes, wrapper classes, conversions between primitive types, wrapper objects and strings, and the Character class methods, with complete Java programs.

Important Terms and Definitions

1. Classes and arrays are also datatypes, called user-defined or reference.

2. String is a class.

3. The statement
String str;
declares to the compiler that a variable (Object) of the class String would be called str.
4. An object str of the class String is created by the statement
String str = new String();            // String object is empty.
or
String str = new String("Ta Ta");     // String object is assigned value "Ta Ta".

5. All eight primitive datatypes (byte, short, int, long, float, double, boolean, char) have corresponding wrapper classes: Byte, Short, Integer, Long, Float, Double, Boolean & Character.

6. There is no abbreviation, such as, Int for Integer, char for Character in wrapper class names.

7. Each wrapper class encapsulates or wraps up a primitive datatype in a class that offers methods to convert between types.

8. This allows representation of a variable by an object.

9. These classes are available in java.lang package, which is not required to be imported.

10. There are six conversion methods that allow transmissions from one Type, its Class and the String class.
For Integer Type int i ; String s ; Integer j ; s = Integer.toString(i); i = Integer.parseInt(s); j = Integer.valueOf(i); i = j.intValue(); j = Integer.valueOf(s); s = j.toString(); Note: j is an instance of the Integer Class.

11. A Wrapper class provides methods for primitive types, e.g. Float class provides parseFloat() method for Float variable.

12. A class (static) method is invoked by using the class name, e.g. double b = Math.sqrt(x);
This statement invokes the class method sqrt ( ); which is defined in the Math class.

13. An instance method (without static modifier) uses the name of the object with which it is attached. For example,
float a = random.nextFloat ( );
Here, nextFloat ( ) method, which is defined in the Random class and is bound to the object random (an instance of Random class) class, is being invoked.

14. Two objects with same data values are equal.

15. Two references, which refer to the same object are equal.

16. A primitive type data x may be converted into a string strx by
String strx = String.valueOf (x);
17. A String today = "April 25";
may be converted into a primitive type data as follows:
String todayDayString = today.substring (6, 8);
int todayDayInt = Integer.parseInt (todayDayString);
parseInt ( ) method is defined in the Integer Class. The String object todayDayString is passed to it. The method reads the two characters '2' and '5' from the string todayDayString, converts to their equivalent numerical values i.e. 2 and 5 and after combining, forms the integer 25 and returns it.

18. Datatypes created by the user, are known as User-Defined Datatypes.

19. Datatypes created by using the primitive or fundamental datatypes (e.g. byte, short, int, long, float, double, char, boolean) are known as composite datatype.

20. A composite datatype is created by the user. So, it is user-defined datatype.

21. A class is an example of composite user-defined datatype.

22. The variables of a class type are objects.

23. All reference types act as composite datatypes.

24. A user may define his(her) own datatype by defining them with the help of a class construct.

25. Where primitive datatypes are built in Java, composite datatypes are created by the user.

26. Where the sizes of the primitive datatypes are fixed, composite datatypes have variable sizes.

27. Where primitive datatypes are available in all parts of a program, composite datatypes are available as per their scope.

28. When a class is introduced as user-defined datatype, it does not include the main ( ) method.

29. The new operator is used to create objects.

30. The public members of objects are obtained by using dot operator (e.g. Objectreference.membername).
e.g. pointA.x; // Refers to x co-ordinate (data member) of object point A
pointA.y; // Refers to y co-ordinate of object point A

31. String is not a primitive datatype and therefore has no wrapper class.
But a string object may be created in the same way a primitive type is created.
String s1 = new String ("Java");
32. The valueOf ( ) class method available in each wrapper class provides another way of creating wrapper objects. For example
Integer intg = Integer.valueOf ("13");
Float ft = Float.valueOf ("123.4");
Character ch = Character.valueOf ('p');
33. Some useful methods are listed in the following table:
Sl.No.Method NamePurpose Served
1int parseInt (String s)Converts String s to an integer.
2Integer valueOf (String s)Creates an Integer wrapper object initializing it to the String s.
3long parseLong (String s)Converts String s to a long datatype.
4Long valueOf (String s)Creates a Long wrapper object initializing it to the String s.
5float parseFloat (String s)Converts String s to a float datatype.
6Float valueOf (String s)Creates a Float wrapper object initializing it to the String s.
7double parseDouble (String s)Converts String s to a double type data.
8Double valueOf (String s)Creates a Double wrapper object initializing it to the String s.
9boolean isDigit (char ch)Returns True or False according as character ch is a digit or not.
10boolean isLetter (char ch)Returns True/False according as character ch is a letter or not.
11boolean isLetterOrDigit (char ch)Returns True/False according as character ch is a letter or digit or otherwise.
12boolean isLowerCase (char ch)Returns True or False according as character ch is in lowercase or not.
13boolean isUpperCase (char ch)Returns True or False according as character ch is in uppercase or not.
14boolean isWhitespace (char ch)Returns True or False according as character ch is a white (blank) space or not.
15char toLowerCase (char ch)Character ch is converted to its lowercase form.
16char toUpperCase (char ch)Character ch is converted to its uppercase form.

 

Questions with Answers

Question 1. What are the fundamental datatypes?
Answer:
There are eight fundamental datatypes (also known as primitive datatypes): byte, short, int, long, float, double, char, boolean.

 

Question 2. What is a composite datatype?
Answer:
The datatype created by using the primitive datatypes, is known as composite datatype.

 

Question 3. What are user-defined datatypes?
Answer:
User-defined datatypes are same as composite datatypes. These are created by the user, using the primitive datatypes.

 

Question 4. What is a Composite class?
Answer:
A class created by using primitive and composite datatypes is called a composite class.

 

Question 5. Give an example of a class as a composite datatype.
Answer:
Let us consider the following code:
class compositeType {
    int p;
    float q;
    double r;
    char ch;

    public void enterData ( ) { ... }

    public void showData ( ) { ... }
}

The class which is defined using primitive datatypes is a composite datatype.
In order to solve a problem, almost every program coded contains a composite class.

 

Question 6. What are the special variables of a composite class?
Answer:
Its objects. Those may be defined as follows:
compositeType var1 = new compositeType ( );

 

Question 7. What is the difference between primitive datatypes and composite datatypes?
Answer:
In Java, primitive datatypes are inbuilt having fixed size. Whereas the composite datatypes are created by the user. Their sizes are not fixed but vary.

 

Question 8. Mention three distinctions between composite and primitive datatypes.
Answer:
Composite DatatypePrimitive Datatype
1. Created by the user1. Built in
2. Have variable size2. Have fixed size
3. Accessibility depends on the defined scope.3. Accessible in all parts of a program

 

Question 9. What is a wrapper class? Give example.
Answer:
Each of the eight primitive datatypes has an associated class called a wrapper class which generalizes the type. Each wrapper class encapsulates or wraps up a primitive datatype which enables a variable to be represented by an object, when required. The wrapper class also provides methods for primitive classes.
The eight wrapper classes are Byte, Short, Integer, Long, Float, Double, Character and Boolean.

 

Question 10. Mention and illustrate six conversion methods between the type double, class Double and class String.
Answer:
double x ; String s ; Double y ; s = Double.toString(x); x = Double.parseDouble(s); y = Double.valueOf(x); x = y.doubleValue(); y = Double.valueOf(s); s = y.toString();
Here x is of type double, y is an object of class Double and s is a String.

 

Question 11. State the purpose and return datatype of the wrapper class methods:
(i) Long valueOf (String s)
(ii) long parseLong (String s).

Answer:
(i) To create a Long wrapper object initializing it to the string s. It returns a Long object.
(ii) To convert String s to a long datatype. It returns a long value.

 

Question 12. By an example (program), elucidate how class can be used to define composite datatypes.
Answer:
class textBook {
    String subject, name, author;
    int noOfPages;
    float price;

    public textBook ( )
    {
        this.subject = "";
        this.name = "";
        this.author = "";
        this.noOfPages = 0;
        this.price = 0.0f;
    }

    public textBook (String subject, String name, String author, int noOfPages, float price)
    {
        this.subject = subject;
        this.name = name;
        this.author = author;
        this.noOfPages = noOfPages;
        this.price = price;
    }

    public void show ( )
    {
        System.out.println ("Subject = " + subject);
        System.out.println ("Name = " + name);
        System.out.println ("Author = " + author);
        System.out.println ("No. of pages = " + noOfPages);
        System.out.println ("Price = Rs. " + price);
    }
}

Note: Objects or variables of the textBook class may be created in the following two ways:
(i) textBook tB1 = new textBook ( );
(ii) textBook tB2 = new textBook ("Java Programming", "Programming with Java", "Hubbard", 257, 300);

 

Question 13. In which package are the wrapper classes contained?
Answer:
java.lang package.

 

Question 14. Illustrate that a constructor may not be used for initializing string objects.
Answer:
String str = new String ("Four Idiots");
Same effect as the above statement can be produced simply by a statement with a string value as:
String str = "Four Idiots";

 

Question 15. By using a program, illustrate the conversion between a variable of int type, an instance of the Integer class, and an instance of the String class.
Answer:
public class IntegerClass {
    public void conversion ( ) {
        int x = 123;
        System.out.println ("int x = " + x);
        Integer y = Integer.valueOf (x);
        System.out.println ("Integer y = " + y);
        String str = y.toString ( );
        System.out.println ("String str = " + str);
        x = Integer.parseInt (str);
        System.out.println ("int x = " + x);
        str = Integer.toString (x);
        System.out.println ("String str = " + str);
        y = Integer.decode (str);
        System.out.println ("Integer y = " + y);
        x = y.intValue ( );
        System.out.println ("int x = " + x);
    }
}

The output will be:
int x = 123
Integer y = 123
String str = 123
int x = 123
String str = 123
Integer y = 123
int x = 123

 

Question 16. What will be the output for the following program segment?
String S = new String ("xyz");
System.out.println (S.toUpperCase ( ));

Answer:
XYZ

 

Question 17. Name a package that is invoked by default.
Answer:
java.lang

 

Question 18. Write a statement for each of the following:
(i) Store a number 275 as a string.
(ii) Convert the string to a numeric value.
(iii) Add it to the existing total of 1000 to update the total.

Answer:
(i) String str = "275";
(ii) int x = Integer.parseInt (str);
(iii) total = total + x;

 

Question 19. Why is a class known as composite datatype?
Answer:
A class encapsulates a number of various datatypes within a single unit. This is why a class is known as composite datatype.

 

Question 20. What is the method that converts a string to primitive
(i) integer datatype?
(ii) double datatype?
(iii) short datatype?

Answer:
(i) Integer.parseInt (String s)
(ii) Double.parseDouble (String s)
(iii) Short.parseShort (String s)

 

Question 21. What main purpose is served by the
(i) Character class?
(ii) Byte class?

Answer:
(i) The Character class wraps the value of the primitive type char in an object.
(ii) The Byte class serves as the wrapper class of byte integer type object.

 

Question 22. Write a program to illustrate how a character type data is identified
(i) to be a digit (ii) to be a letter (iii) to be in uppercase letter (iv) to be a lowercase letter.

Answer:
class characterTest {
    public static void main (String args[ ]) {
        char chr[ ] = {'X', '2', 'd', '?'};
        for (int i = 0; i < chr.length; i++)
        {
            if (Character.isLetterOrDigit (chr[i]))
            {
                if (Character.isLetter (chr[i]))
                {
                    System.out.println (chr[i] + " is a letter");
                    if (Character.isUpperCase (chr[i]))
                        System.out.println (chr[i] + " is in upper case");
                    else
                        System.out.println (chr[i] + " is in lower case");
                }
                else
                    System.out.println (chr[i] + " is a digit");
            }
            else
                System.out.println (chr[i] + " is neither a digit nor a letter");
        }   // for loop terminates
    }   // main ( ) terminates
}   // class terminates

Output:
X is a letter
X is in upper case
2 is a digit
d is a letter
d is in lower case
? is neither a digit nor a letter

 

Question 23. Give one example each of a primitive data type and a composite data type.
Answer:
One example of primitive data type is int and one example of composite data type is array.

Study Material and Revision Notes for Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type

Download Chapter Summary: Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type

Review targeted chapter notes for Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type. Built according to official ICSE guidelines, these summaries highlight high-yield topics frequently tested in school evaluations.

Concept Clarification for Chapter 05 Class as User-Defined Data Type

Each chapter summary is structured around standard ICSE textbooks, allowing students to check their understanding and clarify complex ideas early in their revision.

Additional Study Resources for Class 10 Computer Applications

Wrap up your chapter revision by testing your knowledge against standard question formats. Everything on our platform is provided free of charge.

FAQs

Where can I download the latest PDF for ICSE Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type Notes and Important Questions with Answers?

You can download the teacher prepared revision notes for ICSE Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type Notes and Important Questions with Answers from StudiesToday.com. These notes are designed as per 2026-27 academic session to help Class 10 students get the best study material for Computer Applications.

Are these Computer Applications notes for Class 10 based on the 2027 board exam pattern?

Yes, our ICSE Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type Notes and Important Questions with Answers include 50% competency-based questions with focus on core logic, keyword definitions, and the practical application of Computer Applications principles which is important for getting more marks in 2027 ICSE exams.

Do these Class 10 notes cover all topic-wise concepts for Computer Applications?

Yes, our ICSE Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type Notes and Important Questions with Answers provide a detailed, topic wise breakdown of the chapter. Fundamental definitions, complex numerical formulas and all topics of ICSE syllabus in Class 10 is covered.

How can I use ICSE Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type Notes and Important Questions with Answers for quick last-minute revision?

These notes for Computer Applications are organized into bullet points and easy-to-read charts. By using ICSE Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type Notes and Important Questions with Answers, Class 10 students fast revise formulas, key definitions before the exams.

Is there any registration required to download Class 10 Computer Applications notes?

No, all study resources on StudiesToday, including ICSE Class 10 Computer Applications Chapter 05 Class as User-Defined Data Type Notes and Important Questions with Answers, are available for immediate free download. Class 10 Computer Applications study material is available in PDF and can be downloaded on mobile.