please someone tell me the difference between a \'static variable\' and a \'normal variable\' in oops or in java. Also their usage if possible.
Static variable is instantiated once in life time of the Type.
For a class Age if you have a static variable static int staticAge;
and another variable as instance variable int instanceAge;
the value assigned to staticAge will be same for all the instance of Age because same variable will shared between all the objects.
the value to instanceAge will be specific to the object of Age.