Skip to content

Instantly share code, notes, and snippets.

@PocasPedro
Created October 2, 2017 17:11
Show Gist options
  • Save PocasPedro/f3ce53299917bed90a7f589d22c52713 to your computer and use it in GitHub Desktop.
Save PocasPedro/f3ce53299917bed90a7f589d22c52713 to your computer and use it in GitHub Desktop.
Java Fundaments for Kids - Exercise 6
/**
Program description
*/
public class CalculatorMethod {
public static void main(String[] args) {
int operator1 = 1;
int operator2 = 2;
int result = Calc(operator1, operator2);
System.out.println("The result is " + result);
public static int Calc (int one, int two)
return result = one + two;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment