O'Reilly logo

Java All-in-One For Dummies, 4th Edition by Doug Lowe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1

Java Programming Basics

In This Chapter

arrow The famous Hello, World! program

arrow Basic elements of Java programs such as keywords, statements, and blocks

arrow Different ways to add comments to your programs

arrow Basic information about object-oriented programming

arrow Ways to import classes

In this chapter, you find the basics of writing simple Java programs. The programs you see in this chapter are very simple: they just display simple information on a console (in Windows, that's a command-prompt window). You need to cover a few more chapters before you start writing programs that do anything worthwhile. But the simple programs you see in this chapter are sufficient to illustrate the basic structure of Java programs.

Be warned that in this chapter, I introduce you to several Java programming features that are explained in greater detail in later chapters. You see, for example, some variable declarations, a method, and even an if statement and a for loop. The goal of this chapter isn't to march ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required