Computer Science, asked by Esha4264, 1 year ago

What is Static Modifier.

Answers

Answered by Anonymous
5

The static modifier should be used in the variable declaration. Any java object that belongs to that class can modify its static variables.

Answered by Anonymous
5
\bold{Answer}


The static keyword in Java means that the variable or function is shared between all instances of that class as it belongs to the type, not the actual objects themselves. So if you have a variable: private static int i = 0; and you increment it ( i++ ) in one instance, the change will be reflected in all instances.
Similar questions