Java beginner error: java: cannot find symbol

Solution for Java beginner error: java: cannot find symbol
is Given Below:

I am intermediate python programmer now learning java, i’m trying to learn the basics but I keep getting the error:

java: cannot find symbol
  symbol:   method SumOfTwoNumbers(int,int)
  location: class Main

Heres my code

public class Main {

    public static void main(String[] args) {
        SumOfTwoNumbers c = new SumOfTwoNumbers(3, 2);
    }

}
public class SumOfTwoNumbers {
    public static int sum(int a, int b) {
        return a + b;
    }
}

You’re creating a class named SumOfTwoNumbers with a static method named sum that returns an integer, so you must do

final int result = SumOfTwoNumbers.sum(3, 2);

If you want to create an instance, you need to change your SumOfTwoNumbers class:

public class SumOfTwoNumbers {
    // Remove the `static` keyword here
    public int sum(int a, int b) {
        return a + b;
    }
}

Then call it like this:

SumOfTwoNumbers c = new SumOfTwoNumbers();
final int result = c.sum(3, 2);