Introduction to Java
Work through these slides. As you read, think about and answer the questions at the bottom of each page. These will be your first experience with Java, so make sure you follow each step closely.
7. Creating a Java Source Program
Answer:
Yes.
Creating a Java Source Program
If you have already figured out how to create, compile and run Java programs on your computer, you can skip the rest of this chapter.
We will use the Notepad editor that comes with Microsoft Windows operating systems. Notepad is simple to use and good for getting started. After you see how things work using Notepad, move on to a better text editor (such as Crimson or Notepad++) or to
a Java integrated development environment (IDE) (such as BlueJ or Dr. Java). For now, our goal is to create a text file called Hello.java containing the text at right. We want to save the file in a folder (subdirectory) and to start a command
prompt window in the same folder.
Goals:
- Start a command prompt window (DOS window) in a folder.
- Create the source file Hello.java
- Save the source file in the same folder.
- Compile the source file to create the file of bytecodes Hello.class in the folder.
- Run the bytecode file.
Windows 7: To start, LEFT click the "start" icon at the lower left of your screen.
Windows 8: To start, RIGHT click the "window" icon at the lower left of your screen.
class Hello { public static void main ( String[] args ) { System.out.println("Hello World!"); } } |

Question 7:
Will you see exactly the same things as above on your computer system?