GET 70% Discount on All Products Coupon code: "Board70"
Which is true?
Code compiles but throws a runtime exception when run.
It prints 666.
The code compiles and runs successfully but with a wrong answer (i.e., a bug).
The code does not compile successfully.
Given:
What is the result?
42
The compilation fails due to an error in line 4.
17
The compilation fails due to an error in line 3.
The compilation fails due to an error in line 2.
The compilation fails due to an error in line 1.
The compilation fails due to an error in line 5.
and
A NullPointerException is thrown at run time.
The compilation fails.
1
Null
null
A ClassCastException is thrown at run time.
Which two interfaces can be used in lambda expressions? (Choose two.)
MyInterface1
MyInterface3
MyInterface5
MyInterface2
MyInterface4
Which statement on line 1 enables this code to compile?
Consumer function = (String f) -> (System.out.println(f);};
Supplier function = () -> fruits.get (0);
Predicate function = a -> a.equals("banana");
Function function = x -> x.substring(0,2);
Which two var declarations are correct? (Choose two.)
var names = new ArrayList<>();
var _ = 100;
var var = “hello”;
var y = null;
var a;
What is the output?
A compilation error is thrown.
Message from Copier: Attempt00
Message from Abstract Copier: Attempt00
A runtime error is thrown.
1 2 [1, 2, 3, four] 3 four
1 2 [1, 2, 3, 4] 3 4
1 2 [1, 2, 3, 4] 3 four
1 2 [1, 2, 3, four] 3 4
TESTED 23 Feb 2025