public class review{
//method code
public void start() {
int a, b;
a = 5;
b = methodA(a);
System.out.println(a + " " + b);
}
private int methodA(int a) {
int b = 10;
a = a + 5;
return a + b;
}
//method end
}
------------------------------------------------
i compile and run this code in dr.java compiler jdk 6.0_41
it can compile, but when i run it will display like thi
"Static Error: This class does not have a static void main method accepting String[]"
when i try to add
public static void main (String[]args){
//method code
}
when i compile it will display
public void start() {
as an illegal start of expression.
it is something wrong with my dr.java compiler or i wrote wrong code?
hope anyone can help.
thanks in advanced