A.
B.
C.
D.
A. @FunctionalInterfaceinterface InterfaceC {public boolean equals(Object o);int breed(int x);int calculate(int x, int y);}
B. @FunctionalInterfaceinterface InterfaceE {public boolean equals(int i);int breed(int x);}
C. @FunctionalInterfaceinterface InterfaceD {int breed(int x);}
D. interface InterfaceB {int GERM = 13;public default int getGERM() { return get(); }private int get() { return GERM; }public boolean equals(Object o);int breed(int x);
E. interface InterfaceA {int GERM = 13;public default int getGERM() { return GERM; }}
A. The compilation fails.
B. All three readers have been closed.
C. Only reader1 has been closed.
D. All three readers are still open.
A. b3
B. b1
C. b2
D. 2
E. 1
F. The compilation fails due to an error in line 1.
G. 3
A. var y = null;
B. var names = new ArrayList<>();
C. var _ = 100;
D. var var = "hello";
E. var a;
A. An exception is thrown at runtime
B. Mr, Green
C. Mr, Blue
D. Green
A. Input:Then block until any input comes from System.in.
B. A NullPointerException is thrown at run time.
C. Input:Echo: Helloworld
D. Input: Helloworld Echo: Helloworld
E. Input: Echo:
A. [A, B, C][A, B, C]
B. [A, B, C]followed by an exception thrown on line 11.
C. On line 9, an exception is thrown at run time.
D. [A, B, C][ B, C]
A. [0,0] = Red[0,1] = White[1,0] = Black[1,1] = Blue[2,0] = Yellow[2,1] = Green[3,0] = Violet
B. [0,0] = Red[0,1] = White[1,0] = Black[2,0] = Blue[2,1] = Yellow[2,2] = Green[2,3] = Violet
C. [0,0] = Red[1,0] = Black[2,0] = Blue
D. java.lang.ArrayIndexOutOfBoundsException thrown
A. .filter(Employee::getLocality).distinct().count();
B. .map(e -> e.getLocality()).collect(Collectors.toSet()).count();
C. map(e -> e.getLocality()).count();
D. .map(Employee::getLocality).distinct().count();
A. Fox class does not have to override inhabit method, so long as it does not try to call it.
B. Fox class does not have to override the inhabit method if Forest and Town provide compatible implementations.
C. Fox class must provide implementation for the inhabit method.
D. Fox class must implement either Forest or Town interfaces, but not both.
E. The inhabit method implementation from the first interface that Fox implements will take precedence.
A. Line 1 is the first line to cause a compilation error,
B. Line 2 Is the first line to cause a compilation error.
C. Line 3 is the first line to cause a compilation error.
D. It complies without errors.
A. NumberFormat formatter = NumberFormat.getCurrencyInstance(locale);
B. NumberFormat formatter = NumberFormat.getInstance(locale);
C. NumberFormat formatter = NumberFormat.getCurrency(locale);
D. NumberFormat formatter = NumberFormat.getInstance(locale).getCurrency();
A. 234
B. 2143
C. 214
D. 2134
A. A java.lang.NullPointerException is thrown.
B. True
C. A java.lang, UnsupportedOperationException is thrown.
D. False