Created
July 4, 2011 13:00
-
-
Save ueshin/1063313 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
scala> J.setClass(classOf[java.util.ArrayList[_]]) | |
<console>:8: error: type mismatch; | |
found : java.lang.Class[java.util.ArrayList[_]](classOf[java.util.ArrayList]) | |
required: java.lang.Class[_ <: java.util.List] | |
J.setClass(classOf[java.util.ArrayList[_]]) | |
^ |
This file contains hidden or 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 J { | |
public static void setClass(Class<? extends java.util.List> clazz) { | |
System.out.println(clazz.getName()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment