Skip to content

Instantly share code, notes, and snippets.

@ueshin
Created Jul 4, 2011
Embed
What would you like to do?
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[_]])
^
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