Question 1
Consider the Java code given below.
interface Readable{ public default void read(){ System.out.println("Reads"); }}interface Writable{ public default void write(){ System.out.println("Writes"); }}class Document implements Readable, Writable{ public void read(){ System.out.println("Reads the lines in doc"); }}public class Test { public static void main(String[] args) { Readable r1 = new Document(); r1.read(); r1.write(); }
}Choose the correct option