Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class PuzzleOne {
- public static void main(String[] args) {
- method(null);
- }
- public static void method(Object o) {
- System.out.println("Object");
- }
- public static void method(String s) {
- System.out.println("String");
- }
- }
- public class PuzzleTwo {
- public static void main(String[] args) {
- method(null);
- }
- public static void method(Object o) {
- System.out.println("Object");
- }
- public static void method(String s) {
- System.out.println("String");
- }
- public static void method(StringBuffer s) {
- System.out.println("StringBuffer");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement