Data Types and Variables
Last updated
What is Data Types and Variables?
Variable in Java is a data container that stores the data values during Java program execution. Every variable is assigned a data type, which designates the type and quantity of values it can hold. Variable is a memory location name of the data. The Java variables have mainly three types: Local, Instance and Static.
Data Types are divided into two group -
- Primitive - byte,short,int,long,float,double,boolean and char
- Non-Primitive - String, Arrays, Classes, Enums and Records
Free resources to learn Data Types and Variables
- ArticleJava Data Types
- ArticleWhat are Data Types & Variables?
More in stage 1: Learn the Basics
Data Types and Variables: common questions
Can I learn Data Types and Variables in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Data Types and Variables in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Data Types and Variables tutorial for beginners?
It is lesson 10 of 86 in the free Java roadmap, in stage 1, Learn the Basics. If you are new to Java, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.