Created
February 7, 2014 02:01
-
-
Save muanis/8856248 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestClass { | |
public void methoda() { | |
List<ClassB> aList = new ArrayList<ClassB>(); | |
ClassB b = new ClassB(); | |
aList.add(b); | |
List<TestInterface> bList = new ArrayList<TestInterface>(); | |
bList.add(b); | |
TestInterface zz = aList.get(0); | |
TestInterface zz2 = bList.get(0); | |
} | |
} | |
class ClassB implements TestInterface { | |
public void methodA() { | |
return; | |
} | |
} | |
interface TestInterface { | |
void methodA(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment