Advertisement
Guest User

Untitled

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