2. Open a simple text editor like notepad and save it as, say HelloWorld.java, in your created folder (Java Programs in my case)
3. Write the following program in it (and save)
class HelloWorld
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}
4. Open the Start menu and click the Run command (or press Windows key + R). In the Open field type cmd. Click the OK button
6. Next compile the HelloWorld.java file using the javac tool (see JDK tools from the post below). Type javac HelloWorld.java at the command prompt. This compiler turns the HelloWorld.java source code into Java bytecode - HelloWorld.class
8. Next we use the java interpreter, one of the main JDK tools (see the post below), to interpret the HelloWorld.class. Type java HelloWorld at the command prompt
No comments:
Post a Comment