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 variables are those which are at the class or type level. And there will be only one copy of it is available to the all instances of that class type.
And there is no concept of dynamic variables as for as i know. If you came across about this concept at some particular context then mention that, might be helpful to explain you.
EDITED : to answer your question of difference between 'static int' and 'int'.
Say suppose you have a class as
public class StaticInfo{
private static int count;
private int variable;
//.. say setter and getters for variable
//.. static setter and getters for count;
}
So if you create 2 objects of the type StaticInfo then these two will have two different 'variable' member but one common count member which is a class member.
hope it is clear now.