0% found this document useful (0 votes)
2 views

10th_Assignments

Uploaded by

Iamperoplayer 21
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)
2 views

10th_Assignments

Uploaded by

Iamperoplayer 21
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/ 2

Chapter String

Assignment No 6 (Theory)

Pg Nos 487-488
Q1) 6,7,8,9,11,13,14,15
Q2) 4,6,7,9,10

Assignment No 5 (Practical)

Qs) 11,13,15,37,38,40,42,43,45,49

Chapter Library Classes


Assignment No 7 (Theory)
Qs)
1) Name the package that contains the wrapper class.
2) Give the output of the following code:
String p=”20”, q=”19”
int a = Integer.parseInt(p);
int a = Integer.valuOf(q);
System.out.println(a+” “+b);
3) Why is an object called an instance of a class?
4) State the data type and value of variable ‘y’ after the following is executed:
char x=’7’;
y= Character.isLetter(x);
5) What will be the output when the following code segments are executed?

(i)

String s = "1001";
int x = Integer.valueOf(s);
double y = Double.valueOf(s);
System.out.println("x="+x);
System.out.println("y="+y);
(ii) System.out.println("The king said \"Begin at the beginning!\" to me.");

6) State the method that:


1. Converts a string to a primitive float data type.
2. Determines if the specified character is an uppercase character.
7) Define wrapper class.
8) Perform the following operations:
1. Write a statement to convert string constant s1=”23” into integer
type.
2. Write a statement to convert string “45789” stored in g1 into long
integer type.
3. Write a statement to convert string constant n=”45789” into double
type.
9) State the difference between parse and valueOf()? Give one example of
each.
10) State the difference between autoboxing and unboxing.

Chapter Encapsulation
Assignment No 8 (Theory)

1) What does the class encapsulate?


2) What do you mean by encapsulation?
3) How are private members of the class different from public members?
4) What is the visibility mode? Name all the visibility modes that can be used
in a class.
5) State the use of protected access modifier.
6) Define class variable, instance variable, local variable and argument
variable. Give one example of each.
7) What do you mean by a scope?
8) What do you mean by information hiding?

SUBMISSION DATE: 13/11/24

You might also like