HTML & JS
interface USB {
    void read();
    void write();
}

class YouPan implements USB {

    @Override
    public void read() {
        System.out.println("youpan is reading by USB");
    }

    @Override
    public void write() {
        System.out.println("youpan is writing by USB");
    }
}

class JianPan implements USB {

    @Override
    public void read() {
        System.out.println("jinapan is reading by USB");
    }

    @Override
    public void write() {
        System.out.println("jianpan is writing by USB");
    }
}

public class Main {
    public static void main(String[] args) {
      
        YouPan youPan = new YouPan();
       
        youPan.read();
      
        youPan.write();
        
        JianPan jianPan = new JianPan();
       
        jianPan.read();
       
        jianPan.write();

    }
}




Generated URL:

Output:

youpan is reading by USB
youpan is writing by USB
jinapan is reading by USB
jianpan is writing by USB
Report Bug