Dr. Java Beginners Program

by aabhaghimire in Circuits > Microsoft

4624 Views, 9 Favorites, 0 Comments

Dr. Java Beginners Program

splash.png

You will need a basic Dr. Java application on your computer for this instructable

Start Up the Application

IMG_5308.JPG
IMG_5309.JPG

Open the Dr. Java program from the task bar or where you have it saved.

Start Typing the First Line of Code

IMG_5310.JPG

Type the code exactly as follows: (Note: do not forget the open curly brace).

public class HelloEveryone {

Type the Static Void Method

IMG_5311.JPG

Write the second line of code as:

public static void main (String [ ] args) {

Type the Print Statement

IMG_5312.JPG

What you want the user to see is what you write in this line, for example:

System.out.println ("Hello Everyone");

Add One More Line of Print Statement

IMG_5313.JPG

You can type more than just one line like:

System.out.println ("Isn't making instructables fun");

End the Code

IMG_5314.JPG

Close your program with two curly braces:

} }

The program will not run if the braces are not closed.

Compile Your Program

IMG_5317.JPG

Hit the compile button on the menu bar at the top.

Save Your Program

IMG_5316.JPG

A little box will open asking you to save the program, save the program into desired place.

Run the Program

IMG_5320.JPG

Click the run button on the top right of the menu bar.

Your Program Is Now Ready! Yay!

IMG_5322.JPG

Your program has successfully compiled and shown the output in the interactions box on the bottom of the window. Congratulations on completing the first lesson of java programming.