Home | History | Annotate | Download | only in interfacemethods
      1 // Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
      2 // for details. All rights reserved. Use of this source code is governed by a
      3 // BSD-style license that can be found in the LICENSE file.
      4 
      5 package interfacemethods;
      6 
      7 import interfacemethods.p1.I4;
      8 
      9 public class DefaultMethods {
     10 
     11   interface I3 {
     12     default int getValue() {
     13       return 1;
     14     }
     15 
     16   }
     17 
     18   static class C3 {
     19     public int getValue() {
     20       return 2;
     21     }
     22   }
     23 
     24   static class C4 extends C3 implements I3 {
     25   }
     26 
     27   static class C5 implements I4 {
     28   }
     29 
     30   public static void main(String[] args) {
     31     new C2().d1();
     32     System.out.println(new C4().getValue());
     33     new C5().dump();
     34   }
     35 }
     36