language: Java (sun-jdk-1.7.0_10)
date: 946 days 16 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 
interface Interface<T>
{
public void myMethod(T x);
}
 
interface ExtendedInterface<T> extends Interface<T>
{
public void myMethod(T x);
}
 
class MyFirstClass implements ExtendedInterface<String>{
 
    public void myMethod(String x) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
 
class MySecondClass implements Interface<String>{
 
    public void myMethod(String x) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
 
class MyThirdClass implements Interface<String>, ExtendedInterface<Integer>{
 
    public void myMethod(String x) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
 
    public void myMethod(Integer x) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
Main.java:26: Interface cannot be inherited with different arguments: <java.lang.String> and <java.lang.Integer>
class MyThirdClass implements Interface<String>, ExtendedInterface<Integer>{
^
1 error