'OUR' STRUCTURE OF JAVA PROGRAMS We will start with a simplified structure for Java programs initially and expand it as we go. 1. Simplest: one class, one method: For now any Java program that you write will be in this structure. That is, a Java program consists of only one class containing only one function (aka method). In that one function you will exercise your creativity. public class ____ { public static void main (String[] args) { ... } } Your creativity will be exercised in coming up with the name of the class that you will be creating and the body of the method called 'main'. The ____ part is where you put the class name, and the ... part is where the body of your main goes. Most of the time I will give you the name of the class that you will be creating, specially if you are creating a class in the context of a homework assignment. So, your creativity will be confined to the ... part of the program - at least for now. The other things that you see in the structure above are just decorations that you need to (blindly) copy for now until I explain what they all mean later. Yes, I will explain all of those when the right time comes. Example: the Hello program that we saw in Hello.java last time is in this structure as will other programs that we will study for a while. Note: A class named X should reside in a file named X.java, e.g., Hello class in Hello.java, at least for now. One exception to this structure at this point: When you use the Scanner class a little later, you will see that we use import java.util.Scanner at the top of the file, outside the class that you create. That will be the only exception to the structure that you should know about at this point. 2. Will expand this structure later.