Java_4 Flashcards

(6 cards)

1
Q

What value will be printed
System.out.println(1+1);
11
2
11h
1+1

A

2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What will be printed
System.out.println(1+”“+2);
3
1+”“+2
12
1+2

A

12

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which one is NOT a Java interface
Set
Queue
ArrayList
List

A

❌ ArrayList

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What will be printed after code execution

int[] values = {5,4,3,2,1};
System.out.println(values[2]);

A

3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly