Sie sind auf Seite 1von 1

interface Callback { void callback(); } class Client implements Callback { public void callback() { System.out.

println("first version of callback"); } } class Another implements Callback { public void callback() { System.out.println("another version of callback"); } } class Test1 { public static void main(String args[]) { System.out.println("Harpreet kaur Client c=new Client(); c.callback(); Another ob=new Another(); ob.callback(); } }

Das könnte Ihnen auch gefallen