Created
December 8, 2015 10:48
-
-
Save Yur-ok/e1882858c9184d96fa3a 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 Lesson2.KeyPoin1; | |
/** | |
* Created by Юрий on 08.12.2015. | |
*/ | |
public class SumMethod { | |
public static void main(String[] args) { | |
sum(5,2.4); | |
} | |
static void sum(int num1, int num2){ | |
int sum = num1 + num2; | |
System.out.println("Sum of numbers is equal to: " + sum); | |
} | |
static void sum(double num1, double num2){ | |
double sum = num1 + num2; | |
System.out.println("Sum of numbers in equal to: " + sum); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment