Call class to add two numbers in Java : <p>I just started Java and have no idea how to call the class and use the correct variables. I have a Calculator.java file where I have methods to read 2 int , add them or multiply them. (paste them at the end)</p>

<p>Calculator.java</p>

<pre><code>class Calculator {

    int x;
    int y;

    public setNumbers(int x, int y) {

        System.out.print("Input the first number: ");
        return x = in.nextInt();
        System.out.print("Input the second number: ");
        return y = in.nextInt();

    }

    public addNumbers(){

        return x + y;

    }

    public multiplyNumbers(){

        return x * y;

    }
}
</code></pre>

<p>CalculatorApp.java</p>

<pre><code>class CalculatorApp extends Calculator {

    public int pr() {
        return pr();
    }

    public static void main(String[] args) {

        int choice;

        System.out.println("Please choose one of the following options: \n[1] - Set numbers \n[2] - Add Numbers \n[3] - Multiply numbers \nYour choice is: ");  
        choice = in.nextInt();

        switch (choice) {

            case 1: setNumbers();
                break;

            case 2: addNumbers();
                break;

            case 3: multiplyNumbers();
                break;


        }

    }

}
</code></pre>

<p>Errors:</p>

<pre><code> .\Calculator.java:6: error: invalid method declaration; return type required
        public setNumbers(int x, int y) {
               ^
.\Calculator.java:15: error: invalid method declaration; return type required
        public addNumbers(){
               ^
.\Calculator.java:21: error: invalid method declaration; return type required
        public multiplyNumbers(){
               ^
.\Calculator.java:9: error: incompatible types: unexpected return value
                return x = in.nextInt();
                         ^
.\Calculator.java:9: error: cannot find symbol
                return x = in.nextInt();
                           ^
  symbol:   variable in
  location: class Calculator
.\Calculator.java:11: error: incompatible types: unexpected return value
                return y = in.nextInt();
                         ^
.\Calculator.java:11: error: cannot find symbol
                return y = in.nextInt();
                           ^
  symbol:   variable in
  location: class Calculator
.\Calculator.java:17: error: incompatible types: unexpected return value
                return x + y;
                         ^
.\Calculator.java:23: error: incompatible types: unexpected return value
                return x * y;
                         ^
CalculatorApp.java:12: error: cannot find symbol
                choice = in.nextInt();
                         ^
  symbol:   variable in
  location: class CalculatorApp
CalculatorApp.java:16: error: cannot find symbol
                        case 1: setNumbers();
                                ^
  symbol:   method setNumbers()
  location: class CalculatorApp
CalculatorApp.java:19: error: cannot find symbol
                        case 2: addNumbers();
                                ^
  symbol:   method addNumbers()
  location: class CalculatorApp
CalculatorApp.java:22: error: cannot find symbol
                        case 3: multiplyNumbers();
                                ^
  symbol:   method multiplyNumbers()
  location: class CalculatorApp
13 errors
</code></pre>
