Definitions

P = the name of the package
C = the name of the class

The example model
package P;

class C {

	void start(){
	}
	
	public static void main(String[] args) {
		new C().start();
	}
}
 skeleton java

 

Explanation:

 

 1. Mention which package you are working in.
package P
sketch package

 

 2. Write the name of the class. Open and close with a curly brace { }

class C {

}

 

sketch class

 

 3. The main method is the entry point for your application. We will not work in the main method, because that can be messy.

public static void main(String[] args) {
	
}

In short, to make it possible to start your program you need to give your computer these signals (main, public, static, void, String, args, [ ]).

WHY?

main method java

 

 

4. We will work in the start method.

void start() {

}

WHY?

 start method java

 

If you combine all those lines you will see that the following skeleton arises. Btw this is the same as the one you see at the top of the page:

The example model
package P;

class C {

	void start(){
	}
	
	public static void main(String[] args) {
		new C().start();
	}
}
 skeleton java