The number of bytes occupied by a character array of four rows and three columns are:
(a) 12
(b) 24
(c) 96
(d) 48
These videos will help 100% to those who would like to learn Java especially beginners.
(i) A mechanism where one class acquires the properties of another class:
(a) Polymorphism
(b) Inheritance
(c) Encapsulation
(d) Abstraction
(ii) Identify the type of operator &&:
(a) ternary
(b) unary
(c) logical
(d) relational
(iii) The Scanner class method used to accept words with space:
(a) next()
(b) nextLine()
(c) Next()
(d) nextString()
(iv) The keyword used to call package in the program:
(a) extends
(b) export
(c) import
(d) package
(v) What value will Math.sqrt (Math.ceil (15.3)) return?
(a) 16.0
(b) 16
(c) 4.0
(d) 5.0
(vi) The absence of which statement leads to fall through situation in switch case
statement?
(a) continue
(b) break
(c) return
(d) System.exit(0)
(vii) State the type of loop in the given program segment:
for (int i = 5; i ! = 0; i - = 2)
System.out.println(i);
(a) finite
(b) infinite
(c) null
(d) fixed
(viii) Write a method prototype name check() which takes an integer argument and
returns a char:
(a) char check()
(b) void check (int x)
(c) check (int x)
(d) char check (int x)
(ix) The number of values that a method can return is:
(a) 1
(b) 2
(c) 3
(d) 4
(x) Predict the output of the following code snippet: String P = "20", Q ="22";
int a = Integer.parseInt(P);
int b = Integer.valueOf(Q);
System.out.println(a+""+b);
(a) 20
(b) 20 22
(c) 2220
(d) 22
(xi) The String class method to join two strings is:
(a) concat(String)
(b) string.joint(string)
(c) concat(char)
(d) Concat()
(xii) The output of the function "COMPOSITION".substring(3, 6):
(a) POSI
(b) POS
(c) MPO
(d) MPOS
(xiii) int x = (int) 32.8; is an example of __________ typecasting.
(a) implicit
(b) automatic
(c) explicit
(d) coercion
(xiv) The code obtained after compilation is known as:
(a) source code
(b) object code
(c) machine code
(d) java byte code
(xv) Missing a semicolon in a statement is what type of error?
(a) Logical
(b) Syntax
(c) Runtime
(d) No error
(xvi) Consider the following program segment and select the output of the same
when n = 10 :
switch(n)
{case 10 : System.out.println(n*2);
case 4 : System.out.println(n*4); break;
default : System.out.println(n);
}
(a) 20
40
(b) 10
4
(c) 20, 40
(d) 10
10
(xvii) A method which does not modify the value of variables is termed as:
(a) Impure method
(b) Pure method
(c) Primitive method
(d) User defined method
(xviii) When an object of a Wrapper class is converted to its corresponding primitive
data type, it is called as ___________.
(a) Boxing
(b) Explicit type conversion
(c) Unboxing
(d) Implicit type conversion
(xix) The number of bits occupied by the value ‘a’ are:
(a) 1 bit
(b) 2 bits
(c) 4 bits
(d) 16 bits
(xx) Method which is a part of a class rather than an instance of the class is termed
as:
(a) Static method
(b) Non static method
(c) Wrapper class
(d) String method
Question 2
(i) Write the Java expression for (𝑎𝑎 + 𝑏𝑏)𝑥𝑥. [2]
(ii) Evaluate the expression when the value of x = 4:
x * = - - x + x++ + x
(iii) Convert the following do…while loop to for loop:
int x=10;
do
{x– –;
System.out.print(x);
}while (x=1);
[2]
(iv) Give the output of the following Character class methods:
(a) Character.toUpperCase ('a')
(b) Character.isLetterOrDigit('#')
[2]
(v) Rewrite the following code using the if-else statement:
int m= 400;
double ch = (m300) ? (m / 10.0) * 2: (m / 20.0) - 2;
[2]
(vi) Give the output of the following program segment:
int n = 4279; int d;
while(n=0)
{d=n%10;
System.out.println(d);
n=n/100;
}
[2]
(vii) Give the output of the following String class methods:
(a) "COMMENCEMENT" . lastIndexOf('M')
(b) "devote" . compareTo("DEVOTE")
[2]
(viii) Consider the given array and answer the questions given below:
int x[ ]={4,7,9,66,72,0,16};
(a) What is the length of the array?
(b) What is the value in x[4]?
[2]
(ix) Name the following:
(a) What is an instance of the class called?
(b) The method which has same name as that of the class name.
(x) Write the value of n after execution:
char ch ='d';
int n = ch + 5;
java icse class 9,
java icse class 10,
java icse 10th class programs,
java icse class 8,
array in java icse,
icse java complete reference,
scoremaster icse java,
java bluej icse,
java programming for icse class 10,
constructor java icse class 10,
arrays in java icse class 10,
java for icse class 10,
java for icse class 9,
java for 10th icse,
icse java programming,
java class 10 icse theory,
java class 10 icse,
java 10th icse,
java class 8 icse,
java class 9 icse,
icse java class 9 complete reference
Nesta página do site você pode assistir ao vídeo on-line 2d array in icse class 10 java output question| 2D Array | Double Dimension Array in Java | ISCE duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário BOOSTING SKILLS 01 Dezembro 2024, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 60 vezes e gostou 3 espectadores. Boa visualização!