PermGen space has been replaced with which of these in Java 8?
Metaspace
Which method can be overridden from the Predicate class in Java 8?
test(T t)
Each pipeline ends with a/an ____________
Terminal operation
Object o = () -> {[Link](“Example”); };
Object o can be replaced with?
Runnable r
DateTimeFormatter dateFormat=DateTimeFormatter.ISO_DATE;
LocalDate dateOfBirth= [Link](2015,[Link],31);
[Link]([Link](dateOfBirth));
What would be the output?
Java DateTimeException
LocalDate date1 = [Link]();
LocalDate date2 = [Link](1, [Link]);
Period period = [Link](date2, date1);
[Link]("Period: " + period);
Choose the correct output.
Period: 1
The library used to write reactive programs in Java is _________
RxJava
Lambda expressions in Java allow us to treat ___________
Code as data
Which of the following is the correct lambda expression, which adds two
numbers and returns their sum?
Both the options
public interface Adder {
String add(Function<String, String> f);
void add(Consumer<Integer> f);
}
public class AdderImpl implements Adder {
@Override
public String add(Function<String, String> f) {
return [Link]("Welcome ");
}
@Override
public void add(Consumer<Integer> f) {}
}
On calling add() method as described below, what will be the output?
String r = [Link](a -> a + " lambda"); [Link](r);
Runtime error
Which is the new command-line tool for the Nashorn JavaScript engine in
Java 8?
jjs