Already Graded A
What is the result of `System.out.println();`?
A. 3.5
✔✔B. 3
C. 4
D. Compilation error
Which of the following is a valid variable declaration in Java?
A. int 2number;
✔✔B. int number2;
C. int#value;
D. int value%3;
What does `System.out.println(5 * (2 + 3));` print?
A. 25
✔✔B. 25
C. 10
1
,D. Compilation error
Which data type is used to store a single character in Java?
A. string
✔✔B. char
C. letter
D. character
What is the output of `System.out.println("Java".length());`?
✔✔A. 4
B. 5
C. Compilation error
D. 3
Which keyword is used to define a constant variable in Java?
✔✔A. final
B. const
C. static
2
, D. immutable
What will `System.out.println(10 % 4);` return?
A. 0
B. 4
✔✔C. 2
D. Compilation error
Which operator is used to concatenate strings in Java?
✔✔A. +
B. &
C. *
D. ^
What does `System.out.println(3 > 2 && 4 < 5);` print?
✔✔A. true
B. false
C. Compilation error
3