Lesson 4Using Program Statements and Variables

Have you ever tried to learn another spoken language? Have you thought about what is involved in this process? Natural languages are composed of many things: language constructs (nouns, verbs, adjectives, etc.), word order, and tense, to name a few. These features are common to all natural languages, so to learn a new language, you must understand how these features work in that language.

Learning a programming language is similar—you must understand the language constructs and how to say something that makes sense in the language. When learning your first programming language, you have a couple of additional challenges. Not only do you have to learn the programming language, but you also have to learn the meta-language of programming. In other words, you must learn how to talk about programs and programming languages. You will also have to learn the language of the industry and how we talk about software, the process of software development, and computer technology in general. This is a lot to learn at once and can be quite difficult at first; however, it will get easier as you gain experience.

In this lesson, your journey begins with the smallest pieces of the Java language: programs, statements, and variables.

Get Job Ready Java 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.