Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void foo(Object o){
- if(o instanceof Integer){
- System.out.println("Integer");
- }
- if(o instanceof Date){
- System.out.println("Date");
- }
- //And so forth
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement