Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public class PuzzleOne {
  2. public static void main(String[] args) {
  3. method(null);
  4. }
  5. public static void method(Object o) {
  6. System.out.println("Object");
  7. }
  8. public static void method(String s) {
  9. System.out.println("String");
  10. }
  11. }
  12.  
  13. public class PuzzleTwo {
  14. public static void main(String[] args) {
  15. method(null);
  16. }
  17. public static void method(Object o) {
  18. System.out.println("Object");
  19. }
  20. public static void method(String s) {
  21. System.out.println("String");
  22. }
  23. public static void method(StringBuffer s) {
  24. System.out.println("StringBuffer");
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement