Advertisement
MaximCherchuk

Untitled

Sep 5th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. class Class {
  2.     public int get_id() {
  3.         return 1;
  4.     }
  5. }
  6.  
  7. interface Interface {
  8.     default public int get_id() {
  9.         return 2;
  10.     }
  11. }
  12.  
  13. class Successor extends Class implements Interface {
  14. }
  15.  
  16. public class Main {
  17.  
  18.     public static void main(String[] args) {
  19.         Successor s = new Successor();
  20.         System.out.println(s.get_id());
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement