Created
November 20, 2015 09:47
-
-
Save garex/6839790b37aa989afd2b to your computer and use it in GitHub Desktop.
What will be in the result?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package orthodox; | |
public class Polyshit { | |
public static void main(String[] args) { | |
Polyshit me = new Polyshit(); | |
Number integerAsNumber = new Integer(1); | |
Integer integer = new Integer(1); | |
System.out.println(me.doWork(integerAsNumber)); | |
System.out.println(me.doWork(integer)); | |
} | |
public String doWork(Number arg) { | |
return "Number"; | |
} | |
public String doWork(Integer arg) { | |
return "Integer"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment