Skip to content

Instantly share code, notes, and snippets.

@davidsheldon
Created March 24, 2009 17:10
Show Gist options
  • Select an option

  • Save davidsheldon/84229 to your computer and use it in GitHub Desktop.

Select an option

Save davidsheldon/84229 to your computer and use it in GitHub Desktop.
class gen {
Object obj;
public gen(Object s) {
obj = s;
}
T test() {
return (T) obj;
}
}
public class test {
public static void main(String args[]) {
gen z = new gen(new Integer(20));
System.out.println(z.test());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment