compilation error while calling static method from another class
Hi,
I am new to Java Programming. I have written two class files Dummy1 and Dummy2.java in the same package Test.
In Dummy1.java I have declared a static final variable and a static method as you can see it below.
package Test;
import java.io.*;
public class Dummy1
{
public static final int var1= 10;
public static int varDisp(int var2)
{
return(var1+var2);
}
}
This is program is compiling fine.
I have called the static method varDisp from the class Dummy2 and it is as follows
package Test;
import java.io.*;
public class Dummy2
{
public int var3=15;
public int test=0;
test+=Dummy1.varDisp(var3);
}
and when i compile Dummy2.java, there is a compilation error <identifier > expected.
Please help me in this program.

