KEMBAR78
Computer Application - Worksheet | PDF | Data Type | Boolean Data Type
0% found this document useful (0 votes)
22 views3 pages

Computer Application - Worksheet

The document outlines a Term 1 curriculum for a Grade X Computers subject, focusing on conditional statements and library functions. It includes multiple-choice questions, program snippet outputs, and case study questions related to primitive data types, wrapper classes, and ASCII codes. The content is designed to assess students' understanding of Java programming concepts.

Uploaded by

aanyabj2010
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views3 pages

Computer Application - Worksheet

The document outlines a Term 1 curriculum for a Grade X Computers subject, focusing on conditional statements and library functions. It includes multiple-choice questions, program snippet outputs, and case study questions related to primitive data types, wrapper classes, and ASCII codes. The content is designed to assess students' understanding of Java programming concepts.

Uploaded by

aanyabj2010
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Term 1

Grade: X

Subject: COMPUTERS
Unit Name: Conditional
Unit Number:1
Statements
Topic Name: Library Functions

I. Multiple Choice Questions:


1. A package contains:

a. tags
b. classes
c. data
d. arrays
2. Each primitive data type belongs to a specific

a. block
b. object
c. wrapper class
d. none

3. Automatic conversion of primitive data into an object of wrapper class is called

a. autoboxing
b. explicit conversion
c. shifting
d. none

4. The parseInt() function is a member of

a. integer wrapper class


b. character wrapper class
c. boolean wrapper class
d. none

5. valueOf() function converts

a. Primitive type to String


b. String to primitive type
c. character to String
d. None
6. Which of the following functions checks whether a character is a blank or not?

a. Character.isBlankSpace( )
b. Character.isWhiteSpace( )
c. Character.isEmptySpace( )
d. Character.isNull( )

7. Which of the following statements is true?

a. Character.isLowerCase( ) and Character.toLowerCase( ) are same.


b. Character.isLetter( ) and Character.isAlphabet( ) are same.
c. parse and valueOf functions are same.
d. Character.isDigit( ) and Character.isNumber( ) are same.

II. Find the output of the following program snippets:


1. char ch = '*';
boolean b = Character.isLetter(ch);
System.out.println(b);
2. char c = 'A';
int n = (int) c + 32;
System.out.println((char)n);
3. char c = 'B';
int i = 4;
System.out.println(c + i);
System.out.println((int)c + i);
4. char ch = 'A';
char chr = Character.toLowerCase(ch);
int n = (int)chr-32;
System.out.println((char)n + "\t" + chr);
5. Write the output of the following:

System.out.println(Character.isUpperCase('R'));

System.out.println(Character.toUpperCase('j'));

6. What are library classes? Give an example.

III. Case study based questions


Java language uses each primitive data type under a specific packet. Other
than a data type, the packet also contains the functions to convert the
primitive type into string and vice versa. The computer uses 128 ASCII
characters. Each character is assigned a specific numeric code called ASCII
code. Java language also has the facility to convert the characters into the
ASCII code and vice versa.

Based on the above discussion, answer the following questions:

(a) What is the name given to the packet containing a primitive data type?
(b) What is the function used to convert a string data into integer type?

(c) Name the term used to convert a primitive data into the object of its
wrapper class.

(d) What is the syntax to convert a string "24" into integer data type?

You might also like