I am trying to create a program like this below in eclipse, but it shows an error. I’m new to java, so could some one help me in fixing it up and reason why it shows an error ?
public class Specifiers {
public static void main(String[] args) {
public void start1()
{
System.out.println("In Start Method");
}
}
}
You have a method declaration within a method. Try this:
Edit: of course, it needs to be static. My bad…