java Variable -A variable can be define as a memory location that stores an data value of a certain type. -A variable consists of a data type along with a suitable name. -Assigning a value for a variable for the first time is called initializing a variable. example int age; output first we took integer the declare its value and then print the output. Constant -The difference between a constant and a variable is that the value held by a variable can be changed throughout the problem execution . but after a constant has been initialized we can not change the value in it. example final double pi 21/7 output ERROR , because we have already declared the value of PI. Comments -Comment can be used to explain written code. -This will help a person to read and understand the code in future . -Comments are ignored by the compiler during compilation. Whatever is written inside the comments will not be printed because it is only for understanding. instagram twitter facebook