Question 126 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question 126 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question

Given:

interface Interfacel {
public default void sayHi() {
System. out.printIn("Hi Interface-1");
y
y

interface Interface2 {
public default void sayHi() {
System.out.printin("Hi Interface-2") +
y
d
public class MyClass implements Interfacel, Interface2 {
public static void main(String{] args) {
Interfacel obj = new MyClass();
obj. sayHi();
y
public void sayHi() {
‘System. out.print1n ("Hi MyClass");
y

What is the result?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

D.