HI
understand this code and try yourself.
interface School {
void disply();
}
class SchoolDetails implements School {
public void disply() {
System.out.println("School Name: Ideal Higher Secondary School");
}
}
public class SchoolDisplay {
public static void example(School sc) {
sc.disply();
}
public static void main(String[] args) {
SchoolDetails details = new SchoolDetails();
example(details);
}
}
java Teacher
Dec 23, 2010