Skip to content

Instantly share code, notes, and snippets.

@Yur-ok
Created December 8, 2015 10:48
Show Gist options
  • Save Yur-ok/e1882858c9184d96fa3a to your computer and use it in GitHub Desktop.
Save Yur-ok/e1882858c9184d96fa3a to your computer and use it in GitHub Desktop.
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