alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (T6360970.java)

This example Java source code file (T6360970.java) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

t6360970

The T6360970.java Java example source code

/*
 * @test /nodynamiccopyright/
 * @bug 6360970
 * @summary javac erroneously accept ambiguous field reference
 * @compile/fail/ref=T6360970.out -XDrawDiagnostics T6360970.java
 */
class T6360970 {
    interface A {
        int i = 1;
    }

    interface B {
        int i = 2;
    }

    interface C extends A, B { }

    static class D {
        public static final int i = 0;
    }

    static class E extends D implements C { }

    int i = E.i; //ambiguous
}

Other Java examples (source code examples)

Here is a short list of links related to this Java T6360970.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.