Created
February 15, 2016 16:03
-
-
Save alexejVasko/a31f517e0be9fec9a5af to your computer and use it in GitHub Desktop.
This file contains hidden or 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 method; | |
public class Square { | |
public static void main(String[] args) { | |
System.out.println(square(5)); | |
System.out.println(square(2.5)); | |
} | |
public static double square(double number) { | |
return number * number; | |
} | |
public static int square(int number) { | |
return number * number; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment