Java Programming homework

profileBell0216
fall2013_assignment_1.doc

North Carolina A&T State University

ITT 240-01- Java

Fall - 2013

Assignment 1

· Due on Friday September 6th.

· Soft copy of the source code should be sent by e-mail or posted to Bb.

· Hard copy should be submitted in the class

· Output screen snapshots are also required

· Word document explains the answers for each part and instructions for running the programs.

· Please write your name and student ID at the top of the word document

Programming Exercise

(Creating, compiling, and running a Java program) Create a source file containing a Java program. Perform the following steps to compile the program and run it (see §1.9, "Creating, Compiling, and Executing a Java Program"):

1) Create a file named Welcome.java for Listing 1.1. You can use any editor that will save your file in text format.

2) Compile the source file.

3) Run the bytecode.

4) Replace "Welcome to Java" with "My first program" in the program; save, compile, and run the program. You will see the message "My first program" displayed.

5) Replace main with Main, and recompile the source code. The compiler returns an error message because the Java program is case-sensitive.

6) Change it back, and compile the program again.

7) Instead of the command javac Welcome.java, use javac welcome.java. What happens?

8) Instead of the command java Welcome, use java Welcome.class. What happens?

Reading Exercise

Read chapter 1. Propose 6 – 12 keywords. Compose 2 – 3 sentences to describe each chapter in a concise, comprehensive, and unambiguous manner.

PAGE

Dr. Naser El-Bathy Page 1