|
Java example source code file (Test4.java)
The Test4.java Java example source code
/**
* @test /nodynamiccopyright/
* @bug 7062745 7157798
* @summary Negative test of conflicting same-name methods inherited from multiple interfaces when parameter types not compatible
* @compile/fail/ref=Test4.out -Werror -Xlint:unchecked -XDrawDiagnostics Test4.java
*/
import java.util.Set;
import java.util.HashSet;
interface A { void m(Set<Integer> s); }
interface B { void m(Set<String> s); }
interface C { void m(Set<?> s); }
interface AB extends A, B {} //error
interface AC extends A, C {} //error
interface D<T> { void m(Set
Other Java examples (source code examples)Here is a short list of links related to this Java Test4.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 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.