Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1: interface Nocturnal {
- 2: default boolean isBlind() {return true;}
- 3: }
- 4: public class Owl implements Nocturnal {
- 5: public boolean isBlind() {return false;}
- 6: public static void main(String[] args){
- 7: Nocturnal nocturnal = (Nocturnal) new Owl();
- 8: System.out.println(nocturnal.isBlind());
- 9: }
- 10: }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement