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.
String str;declares to the compiler that a variable (Object) of the class String would be called str.
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.
For Integer TypeNote: 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.
String strx = String.valueOf (x);
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
But a string object may be created in the same way a primitive type is created.
String s1 = new String ("Java");Integer intg = Integer.valueOf ("13");
Float ft = Float.valueOf ("123.4");
Character ch = Character.valueOf ('p');| Sl.No. | Method Name | Purpose Served |
|---|---|---|
| 1 | int parseInt (String s) | Converts String s to an integer. |
| 2 | Integer valueOf (String s) | Creates an Integer wrapper object initializing it to the String s. |
| 3 | long parseLong (String s) | Converts String s to a long datatype. |
| 4 | Long valueOf (String s) | Creates a Long wrapper object initializing it to the String s. |
| 5 | float parseFloat (String s) | Converts String s to a float datatype. |
| 6 | Float valueOf (String s) | Creates a Float wrapper object initializing it to the String s. |
| 7 | double parseDouble (String s) | Converts String s to a double type data. |
| 8 | Double valueOf (String s) | Creates a Double wrapper object initializing it to the String s. |
| 9 | boolean isDigit (char ch) | Returns True or False according as character ch is a digit or not. |
| 10 | boolean isLetter (char ch) | Returns True/False according as character ch is a letter or not. |
| 11 | boolean isLetterOrDigit (char ch) | Returns True/False according as character ch is a letter or digit or otherwise. |
| 12 | boolean isLowerCase (char ch) | Returns True or False according as character ch is in lowercase or not. |
| 13 | boolean isUpperCase (char ch) | Returns True or False according as character ch is in uppercase or not. |
| 14 | boolean isWhitespace (char ch) | Returns True or False according as character ch is a white (blank) space or not. |
| 15 | char toLowerCase (char ch) | Character ch is converted to its lowercase form. |
| 16 | char 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.
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.
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.
Answer:
| Composite Datatype | Primitive Datatype |
|---|---|
| 1. Created by the user | 1. Built in |
| 2. Have variable size | 2. 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.
Answer:
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.
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";
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
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.
(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 terminatesOutput:
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.
Free study material for Computer Application
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
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.
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.
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.
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.
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.