Chapter 3
Java Programming Basics
IN THIS CHAPTER
Introducing the venerable Hello, World! program
Identifying basic elements of Java programs such as keywords, statements, and blocks
Finding different ways to add comments to your programs
Getting basic information about object-oriented programming
Identifying 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, we 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access