Owl Teach Yourself Java in 24 Hours, Fifth Edition
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS
ROGERS CADENHEAD

Hour 2: Writing Your First Program

Online Interactive Learning Lab

How to start a new project in NetBeans and create the Saluton program as part of that project.

Hour 2 Quiz

Question 1. When you compile a Java program, what are you doing?

1.a. Saving it to disk

1.b. Converting it into a form the computer can better understand

1.c. Adding it to your program collection

Compiling a program converts a .java file into a .class file or a set of .class files.

Question 2. What is a variable?

2.a. Something that wobbles but doesn't fall down

2.b. Text in a program that the compiler ignores

2.c. A place to store information in a program

Variables are one place to store information; later you learn about others such as arrays and constants. Weebles wobble but they don't fall down, and comments are text in a program that the compiler ignores.

Question 3. What is the process of fixing errors called?

3.a. Defrosting

3.b. Debugging

3.c. Decomposing

Because errors in a computer program are called bugs, fixing those errors is called debugging. Some programming tools come with a tool called a debugger that helps you fix errors.

Notes and Corrections

  • None.

Source Files

Reader Questions

  • None.

Activities

  • Solution 1: CiaoMondo.java. Edit
  • Solution 2: Add errors to the Saluton.java program and try to compile the program. Compare the error messages to the errors that you introduced in the program. Edit
   
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS

Search terms used to find this page: Java programming, teach yourself, 24 hours, how to, learn, Sams, Macmillan, Java2, JDK1.5, Java 1.5, JDK 1.5, SDK1.5, Java 2 SDK 1.5, SDK 1.5, Java 2 version 1.5, J2SE 1.5, J2SE 5, Java 2 Standard Edition 1.5, Java 2 Standard Edition 5, Java 2 SDK, Java SDK, Rogers Cadenhead, tutorial, hands-on, source code, code, javac, java, appletviewer, help, learning, applet, application, Java Plug-in, plugin, Swing, GUI, interface, Java2D, IO, Java Web Start, games, novice, beginner, neophyte, rookie

Valid HTML 4.01!

Valid CSS!