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

10. Variables And Constants Example

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. Use one of the types byte, int, short, or long to make integer numbers. Use one of the types, float and double to make numbers with decimal points. You can have a float or double variable that stores an integer number but the reverse is not possible without a concept called typecasting. Use the F or f letter at the end of the number when you write a value that you plan to assign to a float variable. Similiarly use the l or L letter at the end of an integer number when you write a value that you plan to assign to a long variable. char variables can store numbers in which case they are printed as letters whose values are obtained by looking for the numbers in the Unicode table.

Course Cirriculum