Professional Documents
Culture Documents
The feature of Java which makes it possible to execute several tasks simultaneously.
Select one:
a. Code Security
b. Multithreaded Correct
c. None of the Above
d. Robust
e. Platform independent
What did java generates after compiling the java source code?
Select one:
a. Image file
b. None of the Above
c. Byte Code Correct
d. Executable file
e. Class Code
Which of the following we are not allowed to write java source code?
Select one:
a. Notepad
b. BlueJ
c. NetBeans
d. eclipse
e. None of the Above Correct
What was the initial name for the Java programming language?
Select one:
a. NetBeans
b. C
c. Java
d. Oak Correct
e. None of the Above
Quiz#2
Which of the following we are not allowed to write java source code?
Select one:
a. None of the Above Correct
b. NetBeans
c. BlueJ
d. Notepad
e. eclipse
Quiz# 3
Which of the following is a valid statement to accept int input? Let us assume that we have declared scan
as Scanner.
Select one:
a. None of the above Correct
b. short num = scan.nextInt();
c. short num = scan.nextShort();
d. int num = scan.getInt();
e. int num = scan.nextLong();
What will happen if you use JOptionPane. showInputDialog statement in your program?
Select one:
a. The program will display message dialog box returns String value.
b. The program will display an input dialog box that allows the user to input text and returns the correct
type value.
c. The program will display message dialog box.
d. The program will display an input dialog box that allows the user to input text and returns
String value. Correct
e. None of the above
Select one:
a. print "Hello W orld" infinitely
b. Do nothing
c. None of the above.
d. The code will not run because of syntax error
e. print "Hello World" Correct
Select one:
a. none of the above Correct
b. if (y>y)
c. if (x<>y)
d. if (x>y)
e. if (x!<y)
Select one:
a. The code will not run because of syntax error
b. None of the above.
c. print "Hello W orld"
d. print "Hello World" infinitely Correct
e. Do nothing
Select one:
a. 11 Correct
b. 10
c. 1
d. none of the above
e. 0
Select one:
a. if (x>y)?:
b. none of the above
c. if (x>y)
d. if (x<y); Correct
e. if (x<>y)
Which of the following correctly accesses the sixth element stored in an array of 10 elements?
Select one:
a. intArray[6]; Incorrect
b. intArray[10];
c. intArray[7];
d. None of the above
e. stringArray[5];
Which of the following correctly accesses the sixth element stored in an array of 10 elements?
Select one:
a. intArray[7];
b. None of the above
c. stringArray[5]; Correct
d. intArray[6];
e. intArray[10];
What is the index number of the last element of an array with 30 elements?
Select one:
a. 30
b. 31
c. None of the above
d. 29 Correct
e. 0
From the array int[] intArray = { 1, 2, 3, 5, 6, 7 };, what is the value of intArray[3]?
Select one:
a. 5 Correct
b. 7
c. None of the choices
d. 6
e. 4
Quiz # 8
What is the return value of this method: public void sum(){int x=1;} ?
Select one:
a. x
b. void Correct
c. sum
d. 1
e. none of the choices
What is the output of the code snippet below: void main(){test();test();} void test(){System.out.print(“1”);}
Select one:
a. 11 Correct
b. None of the choices
c. 2
d. 1
e. 3
Quiz # 10
Which of the following is the correct way to call the constructor of the parent class?
Select one:
a. this()
b. super() Correct
c. this.call()
d. super.call()