Unit 2: First Program and Program Control
Unit Overview
This unit will help you design, develop, implement, and run a simple Java application using the SDK. You will also describe and use the elements of program control in Java.
Learning Outcomes
After completing this unit, you should be able to
- compile and run a simple Java application using the SDK;
- list the code conventions for the Java programming language;
- write program logic with loops;
- use operators to perform calculations and control the program flow.
Learning Activities
- Read the Learning Notes and follow the links to read the recommended online materials.
- Read the Review Questions and use the discussion board of this course to
- answer any two of the review questions;
- share any useful information about the supplemental reading materials that you have read;
- comment on another student’s response to the review questions;
- answer any questions posed to you.
- Complete the Unit Exercises and share your experience with your peers on the discussion board. [Note: Do not post assignment-relevant pseudocodes or source codes at any time; however, you may post your thoughts, ideas, and problem-solving steps.]
Learning Notes
Read the following recommended online materials:
- The Java Tutorials. (2020). Lesson: The “Hello World!” Application. Redwood Shores, CA: Oracle Corporation.
Choose the appropriate tutorial for your computing environment (Windows or Linux). Review the checklist to ensure that your JDK is installed and ready.
- The Java Tutorials. (2020). Lesson: A Closer Look at the “Hello World!” Application. Redwood Shores, CA: Oracle Corporation.
Review the code you’ve written for your Java application.
- Google Java Style Guide. (2014).
OR
Achut, R. (2000). Java™ Coding Style Guide.
- Poo, D., Kiong, D., & Ashok, S. (2008). Object-Oriented Programming and Java (2nd ed.). London: Springer-Verlag.
- Read Chapter 3: A Quick Tour of Java (pp. 17–37).
- Read Chapter 8: Modularity (pp. 103–117).
- Read Section 10.3: Basic Input and Output (pp. 138–141).
- Eckel, B. (2001). Cleanup: Finalization and Garbage Collection. Thinking in Java (3rd ed.). Upper Saddle River, NJ: Pearson Education.
This web page belongs to Bruce Eckel’s Thinking in Java. You may also want to click on the Contents link and take a look at Chapter 4: Initialization and Cleanup.