OnJava8-Examples/streams/AnImplementation.java

20 lines
412 B
Java
Raw Normal View History

// streams/AnImplementation.java
public class AnImplementation implements AnInterface {
public void firstMethod() {
System.out.println("firstMethod");
}
public void secondMethod() {
System.out.println("secondMethod");
}
public static void main(String[] args) {
AnInterface i = new AnImplementation();
i.firstMethod();
i.secondMethod();
}
}
/* Output:
firstMethod
secondMethod
*/