JAVA-04 The Structure of Java Code

In the previous section , you tidied up your code a bit. Here's what your coding window should look like now: You can see we have the package name first. Notice how the line ends with a semicolon. If you miss the semicolon out, the programme won't compile: package firstproject; //The class name comes next: public class FirstProject { } You can think of a class as a code segment. But you have to tell Java where code segments start and end. You do this with curly brackets. The start of a code segment is done with a left curly bracket { and is ended with a right curly bracket }. Anything inside of the left and right curly brackets belong to that code segment. What's inside of the left and right curly brackets for the cl...