Java Quiz

Java Quiz

1.

Which four options describe the correct default values for array elements of the types indicated?

  1. int -> 0
  2. String -> “null”
  3. Dog -> null
  4. char -> ‘u0000’
  5. float -> 0.0f
  6. boolean -> true
A. 1, 2, 3, 4
B. 1, 3, 4, 5
C. 2, 4, 5, 6
D. 3, 4, 5, 6


2.

Which one of these lists contains only Java programming language keywords?

A. class, if, void, long, Int, continue
B. goto, instanceof, native, finally, default, throws
C. try, virtual, throw, final, volatile, transient
D. strictfp, constant, super, implements, do
E. byte, break, assert, switch, include


3.

Which will legally declare, construct, and initialize an array?

A. int [] myList = {“1”, “2”, “3”};
B. int [] myList = (5, 8, 2);
C. int myList [] [] = {4,9,7,0};
D. int myList [] = {4, 3, 7};


4.

Which is a reserved word in the Java programming language?

A. method
B. native
C. subclasses
D. reference
E. arra


5.

Which is a valid keyword in java?

A. interface
B. string
C. Float
D. unsigned

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper