All java programs contain some class definition. All functions or methods are kept inside the class. You need to know how to place a main method with public static void inside Class definition. Let us know the basic structure of a Java Program for better understanding next Last Minute Java Tutorials in the queue.
Java Program Structure Explained
Here is the sample Hello Java program. Check the tutorial on installing and running Java.