Guest User

Untitled

a guest
Jan 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. Object o = 1;
  2. System.out.println((int) o);
  3. Class <?> t = int.class;
  4. System.out.println(t.cast(o));
  5.  
  6. Exception in thread "main" java.lang.ClassCastException: Cannot cast java.lang.Integer to int
Add Comment
Please, Sign In to add comment