Given the code fragment:
What is the result?
A NullPointerException is thrown at runtime.
[1, 2, 4]
[1, 2, 4, null]
[1, 3, 4, null]
[1, 3, 4]
Compilation fails.
Which three lines fail to compile? (Choose three.)
Line 7
Line 8
Line 9
Line 10
Line 11
Line 12
Given these classes:
And given this main method:
Which two options compile when placed at line n1 of the main method? (Choose two.)
director.stockOptions = 1_000;
employee.salary = 50_000;
manager.budget = 1_000_000;
manager.stockOption = 500;
employee.budget = 200_000;
director.salary = 80_000;
Given:
And given the commands:
1 null
true false
false false
true true
A ClassCastException is thrown at runtime.
Which two initialization statements are valid? (Choose two.)
Boolean available = “TRUEâ€:
String tmpAuthor = author, author =â€Mc Donaldâ€;
Double price = 200D;
Integer pages = 20;
Welcome Visit Count:0Welcome Visit Count: 1
Compilation fails at line n2.
Compilation fails at line n1.
Welcome Visit Count:0Welcome Visit Count: 0
And given the code fragment:
300:300200:300
300:100200:300
300:00:300
100:300300:200
Given the following main method:
5 4 3 2 1 0
5 4 3 2 1
4 2 1
5
Nothing is printed