Hour 2. Writing Your First Program
What You’ll Learn in This Hour:
• Entering a program into a text editor
• Naming a Java program with the class statement
• Organizing a program with bracket marks
• Storing information in a variable
• Displaying the information stored in a variable
• Saving, compiling, and running a program
• Fixing errors
As you learned during Hour 1, “Becoming a Programmer,” a computer program is a set of instructions that tells a computer what to do. These instructions are given to a computer using a programming language.
During this hour, you create your first Java program by entering it into a text editor. When that’s done, you save the program, compile it, and test it out.
Get Sams Teach Yourself Java™ in 24 Hours, Sixth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.