Title | |
---|---|
Which four options describe the correct default values for array elements of the types indicatedWhich four options describe the correct default values for array elements of the types indicated 1. int -> 0
The answer is:
B. 1, 3, 4, 5
|
|
Which one of these lists contains only Java programming language keywordsWhich one of these lists contains only Java programming language keywords?
The answer is:
B. goto, instanceof, native, finally, default, throws
|
|
Which will legally declare, construct, and initialize an arrayWhich will legally declare, construct, and initialize an array?
The answer is:
D. int myList [] = {4, 3, 7};
|
|
Which is a reserved word in the Java programming languageWhich is a reserved word in the Java programming language?
The answer is:
B. native
|
|
Which is a valid keyword in javaWhich is a valid keyword in java?
The answer is:
A. interface
|
|
Which three are valid declarations of a floatWhich three are valid declarations of a float?
The answer is:
C. 1, 3, 6
|
|
Which is a valid declarations of a StringWhich is a valid declarations of a String?
The answer is:
A. String s1 = null;
|
|
What is the numerical range of a charWhat is the numerical range of a char?
The answer is:
D. 0 to 65535
|
|
Which three are legal array declarationsWhich three are legal array declarations?
The answer is:
A. 1, 2, 4
|
|
Which three piece of codes are equivalent to line 3Which three piece of codes are equivalent to line 3?
The answer is:
A. 1, 2 and 3
|
|
Which one of the following will declare an array and initialize it with five numbersWhich one of the following will declare an array and initialize it with five numbers?
The answer is:
B. int [] a = {23,22,21,20,19};
|
|
Which three are valid declarations of a charWhich three are valid declarations of a char?
The answer is:
B. 1, 3, 6
|
|
Which is the valid declarations within an interface definitionWhich is the valid declarations within an interface definition?
The answer is:
A. public double methoda();
|
|
What will be the output of the programWhat will be the output of the program? Note: The command-line invocation is
The answer is:
D. 1 2 3
|
|
What will be the output of the prograWhat will be the output of the progra
The answer is:
D. An exception is thrown at runtime.
|
|
What will be the output of the program, if this code is executed with the command lineWhat will be the output of the program, if this code is executed with the command line: > java F0091 world
The answer is:
D. The code does not run.
|
|
What will be the output of the programWhat will be the output of the program?
The answer is:
D. An exception is thrown at runtime
|
|
What will be the output of the programWhat will be the output of the program ?
The answer is:
C. Compilation fails.
|
|
What will be the output of the programWhat will be the output of the program Note: The command-line invocation is
The answer is:
D. An exception is thrown at runtime
|
|
In the given program, how many lines of output will be producedIn the given program, how many lines of output will be produced?
The answer is:
C. 11
|
MCQs
Views
Best Answers
Points