{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ITP109_Lab1 - New Java Class window – For Source folder...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ITP 109 Lab 1 Goal In this lab, you will write your first Java program - Hello World. View the API specification at http://java.sun.com/javase/6/docs/api/ Assignment Open Eclipse. In the select a workspace window, click the OK button. Select the Workbench icon. Open the Java perspective by selecting the Window Æ Open Perspective Æ Java options. Create a new project by selecting the File Æ New Æ Java Project options or clicking on the New Java Project icon and enter/select the following in the New Project window: For Project name, enter Lab1 Under Contents, select Create new project in workspace Under JRE, select Use default JRE Under Project layout, select Use project folder as root for sources and class files Click the Finish button Create your HelloWorld class by selecting the File Æ New Æ Class options or clicking on the New Class icon and enter/select the following in the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: New Java Class window: – For Source folder, enter Lab1 – For Name, enter HelloWorld – For Which method stubs would you like to create? , select public static void main(String args) – Click the Finish button • In the HelloWorld.java file, do the following: – Remove the comment line starting with // TODO • Any section of code starting with /* and ending with */ is also a comment – Inside the main method, add a print statement by entering System.out.println ("Hello World!"); • Save your file by selecting the File Æ Save options or clicking the File Save icon. • To run your application, right-click on your class in the Package Explorer and select Run As Æ Java Application or select the Run Æ Run As Æ Java Application options. • The Console view should appear at the bottom and display Hello World!...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online