Variables

In this lesson, you'll be introduced to variables in Java.

Introduction

We store different kinds of information in computer memory. The layout of the computer’s memory (RAM or Random Access Memory) tends to be complex. We may not remember where we stored certain information in memory. A variable helps us remember.

A variable is the name we associate with a memory location in computers. For example, if you want to store a phone number in the computer memory, you can create a variable for it. When you need to read or update the phone number, you can simply access the variable you created for it instead of remembering where you stored the phone number.

Get hands-on with 1400+ tech skills courses.