Rules and Regulations

The class name should be start with a capital letter. This is not compulsory but it is a conventional rule. Java is a case sensitive. All keywords in java are written in small letters. As a convention anything that starts with a capital letter is treated as the name of a class in java. Following is a simple java program that prints “Hello world”.

Class Hello {

Public static void main (string arg[]) {

System. Out.  println (“Hello World”);



In the above program, Hello is the class name. This program has main method which has only one statement in it. In the above program public, static, void are keywords, main () is a method, String is a class, println() is a method and System is a class. Println is a method and system is a class. Let us save the program in the name Now we compile the program with the following compound in the dos prompt.

D :\> javac

After the execution of this command, the .class files i.e. Hello. Class is created. In the other words, it is the dos command given to the java compiler to convert contents of the mentioned source into the equivalent byte code. Now the following command is given to the JVM to execute the .class file.

D :\> java Hello.

In the process of executing the .class file one of the responsibilities of the JVM is to convert the .Class file into its equivalent executes code. We always use the edit plus editor for developing java programs. The advantages of edit plus editor are that all the keywords are displayed in blue color. All the predefined classes are displayed in the red color other part of the program is displayed in black. These colors differences help in identifying some of the syntactical errors/grammatical errors.

Simple Programming Java Help

Tutorspoint experts offer best java programming assignments with solutions. send java aaassignment questions for Quick & Easy Answers