Description
Project objectives:
This project was designed to ensure that the students be able to install a free BlueJ software and build a Java project by using BlueJ. In this project, the student will practice:
-
Building a Java project by using BlueJ
-
Knowing how to put comments in a Java program
-
Knowing how to use System.out.print and System.out.println
-
Having a basic concept about the case-sensitive of Java
Description of the Problem
Write a Java program that print out the following message:
Hello World!
This is my first Java program.
Step 0. Download and install BlueJ from
http://www.bluej.org/download/download.html
Step 1. Follow the following process, you should answer all the questions by using comments in your .java file
-
Launch BlueJ.
-
Creating a project by click on Project menu, and then clicking New Project….
-
In the New Project window, using Look in: navigate to the folder where you want to save your project. In File Name field, type Project01, then click on Create button. You will see Project01 project window.
-
In Project01 project window, click on New Class button. The Create New Class window will prompt out. In Class Name: text filed, type the class name as YourNameProject01, then click on OK button. You will see a yellow rectangle with YourNameProject01 in it.
-
Double click that yellow rectangle, a new window will be opened. There are some preset text in the window, do following changes
-
On the top of the file, there are multiple lines of comments in /* and */. Change the content accordingly.
-
Delete all the content in the brackets under the public class line. Type the following code in it:
-
-
Break the line of code . System.out.println(“Hello, World!”); To System.out.println(“Hello,
World!”);
What happens?
-
Change first System.out.println to System.out.print, what happens?
Step 2. Submit YournameProject01.java file to blackboard. Ensure that you have answered questions 6, 7, and 8 above. Your answer should be written as comments in your .java file.