answersLogoWhite

0

data type refers to the kind of value that is held by a particular variable. For ex: an int variable contains integer value, a string holds a alpha numeric value etc.

variable refers to the name of a value using which we can refer to this value.

Ex:

public int age = 28;

here int is the data type and age is the variable.

User Avatar

Janick McGlynn

Lvl 10
3y ago

Still curious? Ask our experts.

Chat with our AI personalities

TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
ReneRene
Change my mind. I dare you.
Chat with Rene
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao

Add your answer:

Earn +20 pts
Q: What is the difference between data and variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp