Lesson 1A - First Java Program "Hello World" With DEBUGGING Examples
Lesson 1A - First Java Program "Hello World" With DEBUGGING Examples
“HELLO WORLD”
With DEBUGGING examples
By John B. Owen
All rights reserved
Copyright 2011, revised 2014
Table of Contents
• Objectives
• “Hello World” Lesson Sequence
• Compile Errors – Lexical
• Compile Errors – Syntax
• Four parts of an error message
• Lesson Summary / Labs
• Contact Information for supplementary materials
Objective #1
• In this lesson the student will
successfully enter, compile, and
execute the source code for the
“HELLO WORLD” program.
• CS1 TEKS 126.33c2(A) create and properly display meaningful output;
Objective #2
• You will also recognize and
successfully DEBUG typical errors
that occur during the programming
process, using this first program
example.
• CS1 TEKS 126.33c4(H) identify and debug errors;
“Hello World” Lesson Sequence
• The next six slides show this
programming process done
flawlessly – no errors
• After that, examples are shown of
typical errors and how to fix them
• Fixing errors is called DEBUGGING,
and is a normal and crucial part of
the programming process.
Step 1 – Create and save a new file
called “hello.java”
Step 2 – Type in this code and save it
The four parts of the message are still shown, but notice
that the line number and “^” are actually on the line
following the location of the missing brace.