For this Question: Write a class with the name SumCalculator. The class needs two fields (public variables) with names num1 and num2 both of type int.

Write the following methods (instance methods):
<b>*Method named sum without any parameters, it needs to return the value of num1 + num2.</b>
<b>*Method named sum2 with two parameters a, b, it needs to return the value of a + b.</b>
<b>*Method named fromObject with two parameters of type sumCalculator object named obj1 and obj2, and you have to call sum function for respective object and return sum of both</b>

NOTE: All methods should be defined as public, NOT public static.
NOTE: In total, you have to write 3 methods.
NOTE: Do not add the main method to the solution code.You don't have to take any input, You only have to write class <b>SumCalculator</b>.Output will be printed by tester, "Correct" if your code is perfectly fine otherwise "Wrong".Sample Input: 
1

Sample Output:
Correct, I have written this Solution Code: class SumCalculator{
    public int num1,num2;
    SumCalculator(int _num1,int _num2){
        num1=_num1;
        num2=_num2;
    }
    public int sum() {
        return num1+num2;
    }
    public int sum2(int a,int b){
        return a+b;
    }
    public int fromObject(SumCalculator obj1,SumCalculator obj2){
        return obj1.sum() + obj2.sum();
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?