Java_4 Flashcards
(6 cards)
1
Q
What value will be printed
System.out.println(1+1);
11
2
11h
1+1
A
2
2
Q
What will be printed
System.out.println(1+”“+2);
3
1+”“+2
12
1+2
A
12
3
Q
What will be printed after code execution
int a = 10; int b = 100; if (a < b) { boolean f = b == a; System.out.println(f + " " +b); }
A
false 100
4
Q
Which one is NOT a Java interface
Set
Queue
ArrayList
List
A
❌ ArrayList
5
Q
What will be printed after code execution
int[] values = {5,4,3,2,1};
System.out.println(values[2]);
A
3
6
Q
A