Create your account

Already have an account? Login here

Note: By joining, you will receive periodic emails from Coursetro. You can unsubscribe from these emails.

Create account

9. Variables And Constants Explained

Getting Started with Java

Woah, wait a second..

This is a 100% free course, but we need you to first join or login to watch this video.

Alright, join or login here.

This video shows how to create variables and constants in java. Variables are names given to memory locations where you can store values. Once you have given a value to a variable, you can change it any number of times and it will display the latest value after you update it. Each variable is destined to store a type of data. byte, short, int, long can store integer numbers. float and double variables can store numbers with decimal points. char is capable of storing a single character and boolean stores either true or false. If you add the keyword final before a variable, it becomes a constant. Once you assign a value to a constant you cannot change it.

Course Cirriculum