New course! Every coder should learn Generative AI!
Try a free lesson+ 4
In simple words, a variable is a container for data.
+ 2
Parveen Kumar
variable is just like you define yourself as a person and person can be male or female.
As person can have different type same as a variable can have different type like integer, double, String.