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.
Chat with our AI personalities