PHW1: Hello World

Now you will create your first itty bitty Java program from scratch!

Rx: <5 min Av: 5-10 min Sd: 10-15 min DNF: 15+ min

Instructions

  1. Open Eclipse and go to File > New > Java Project
  2. Name this project HelloWorld_uLogin and hit Finish
  3. Right-click on the HelloWorld_uLogin project folder and go to New > Class
  4. Name the class HelloWorld and make sure to select the checkbox next to public static void main(String[] args):

    (Don’t worry, we’ll learn what all those words mean later!)
    Keep in mind that you should not use your uLogin in class names, method names, or any other names besides your project or zip file names.
  5. Double-click the project folder, the src folder, and then the default package. You should now see a class file, HelloWorld.java.
  6. In the main method, type the Java code necessary to print “Hello, World!”: System.out.println("Hello, World!");
  7. To run the program:
    • Click on the green play button at the top of the screen OR
    • Right-click name.java class and select “Run As > Java Application”
  8. Run the program to verify your changes.

Demonstration

Once you’ve finished doing the HW a single time, watch me do it:

Standard Practice HW Advice

You’ll learn significantly less from watching me solve the practice HW if you haven’t attempted the HW yourself first.

While it’s an achievement to finish the HW no matter how long it takes, you might experience “diminishing returns” if you work longer than the DNF time. Thus, it might be strategic to stop working at the DNF time and watch my solution.

After watching my solution, I recommend that you repeat the HW if you have not achieved at least Av performance. If so, be sure to:

Feel free to keep trying until you make Rx if that’s of interest to you.