Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // What greet() from GreeterExample would print
- public abstract class GreeterAbstract {
- public abstract void printMessage();
- public void greet() {
- System.out.println("Hello!");
- }
- }
- public interface GreeterInterface {
- void printMessage();
- default void greet() {
- System.out.println("Greetings!");
- }
- }
- public class GreeterExample extends GreeterAbstract implements GreeterInterface {
- // Implementation goes here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement