AnswerkeyComputerProgramming PDF
AnswerkeyComputerProgramming PDF
b. true
What will be the value of x if we execute this: String s = "25"; int x = Integer.parseInt(s); ?
e. int 25
Which of the following is the correct way to call the constructor of the parent class?
b. super()
The feature of Java which makes it possible to execute several tasks simultaneously.
e. Multithreaded
From the array int[] intArray = { 1, 2, 3, 5, 6, 7 };, what is the value of intArray[2]?
c. 3
What is the index number of the last element of an array with 20 elements?
d. 19
Which of the following is a valid statement to accept int input? Let us assume that we have
declared scan as Scanner.
b. int num = scan.nextInt();
What will be the value of x after executing this code for(int x=0; x<=11; x++) {} is run?
c. 12
What did java generates after compiling the java source code?
b. Byte Code