Quiz
- What does JDK stand for?
- Java Document Kronos
- June Development Karate
- Java Development Kit
- Java Developer Kit
- What does JCL stand for?
- Java Classical Library
- Java Class Library
- Junior Classical Liberty
- Java Class Libras
- What does Java SE stand for?
- Java Senior Edition
- Java Star Edition
- Java Structural Elections
- Java Standard Edition
- What does IDE stand for?
- Initial Development Edition
- Integrated Development Environment
- International Development Edition
- Integrated Development Edition
- What are Maven's functions?
- Project building
- Project configuration
- Project documentation
- Project cancellation
- Which of the following are Java primitive types?
boolean
numeric
integer
string
- Which of the following are Java numeric types?
long
bit
short
byte
- What is a literal?
- A letter-based string
- A number-based string
- A variable representation
- A value representation
- Which of the following are literals?
\\
2_0
2__0f
\f
- Which of the following are Java operators?
%
$
&
->
- What does the following code snippet print?
int i = 0; System.out.println(i++);
0
1
2
3
- What does the following code snippet print?
boolean b1 = true; boolean b2 = false; System.out.println((b1 & b2) + " " + (b1 && b2));
false true
false false
true false
true true
- What does the following code snippet print?
int x = 10; x %= 6; System.out.println(x);
1
2
3
4
- What is the result of the following code snippet?
System.out.println("abc" - "bc");
a
abc-bc
- Compilation error
- Execution error
- What does the following code snippet print?
System.out.println("A".repeat(3).lastIndexOf("A"));
1
2
3
4
- Which of the following are correct IDs?
int __
(two underscores)2a
a2
$
- What does the following code snippet print?
for (int i=20, j=-1; i < 23 && j < 0; ++i, ++j){ System.out.println(i + " " + j + " "); }
20 -1 21 0
- Endless loop
21 0
20 -1
- What does the following code snippet print?
int x = 10; try { if(x++ > 10){ throw new RuntimeException("The x value is out of the range: " + x); } System.out.println("The x value is within the range: " + x); } catch (RuntimeException ex) { System.out.println(ex.getMessage()); }
- Compilation error
- The
x
value is out of the range: 11 - The
x
value is within the range: 11 - Execution time error
- What does the following code snippet print?
int result = 0;
List<List<Integer>> source = List.of(
List.of(1, 2, 3, 4, 6),
List.of(22, 23, 24, 25),
List.of(32, 33)
);
cont: for(List<Integer> l: source){
for (int i: l){
if(i > 7){
result = i;
continue cont;
}
}
}
System.out.println("result=" + result);
result = 22
result = 23
result = 32
result = 33
- Select all the following statements that are correct:
- A variable can be declared.
- A variable can be assigned.
- A variable can be defined.
- A variable can be determined.
- Select all the correct Java statement types from the following:
- An executable statement
- A selection statement
- A method end statement
- An increment statement