Question 1.
(a) Define encapsulation. [2]
(b) Explain the purpose of using a ‘new’ keyword in a Java program. [2]
(c) What are literals? [2]
(d) Mention the types of access specifiers. [2]
(e) What is constructor overloading? [2]
Question 2.
(a) Differentiate between boxing and unboxing. [2]
(b) Rewrite the following condition without using logical operators:
if ( a>b || a>c )
System.out.println(a);
[2]
ICSE Specimen Paper 2020 onwards 2
(c) Rewrite the following loop using for loop:
while (true)
System.out.print("*");
[2]
(d) Write the prototype of a function search which takes two arguments a string
and a character and returns an integer value.
[2]
(e) Differentiate between = and == operators. [2]
Question 3.
(a) State the number of bytes and bits occupied by a character array of 10 elements. [2]
(b) Differentiate between Binary Search and Linear Search techniques. [2]
(c) What is the output of the following:
String a="Java is programming language \n developed by \t\'James Gosling\'";
System. out. println(a);
[2]
(d) Differentiate between break and System. exit(0). [2]
(e)
Write a statement in Java for √
(+)
3
|−|
[2]
(f) What is the value of m after evaluating the following expression:
m - = 9%++n + ++n/2; when int m=10,n=6
[2]
(g) Predict output of the following:
(i) Math.pow(25,0.5)+Math.ceil(4.2)
(ii) Math.round ( 14.7 ) + Math.floor ( 7.9)
[2]
(h) Give the output of the following java statements:
(i) "TRANSPARENT".toLowerCase();
(ii) "TRANSPARENT".compareTo("TRANSITION")
[2]
(i) Write a java statement for each to perform the following task:
(i) Find and display the position of the last space in a string str.
(ii) Extract the second character of the string str.
[2]
ICSE Specimen Paper 2020 onwards 3 Turn Over
(j) State the type of errors if any in the following statements:
(i) switch ( n > 2 )
(ii) System.out.println(100/0);
Answers
Answered by
0
Answer:
Kingdom
Eukaryotic, prokaryotic. Uni or multi cellular
Mode of nutrition
Reproduction
Shapes
Examples
Flagella in bacteria, mycelium and hyphe in fungi
Diseases
3) bacteria and fungipls follow
like answers
user sad
Similar questions