I have single class in java having two methods. one is public static void main(String args []). when i call other method inside main i get above error.
class Test {
public static void main(String[] args) {
method();
}
private void method() {
System.out.println("hello");
}
}