Computer Science, asked by jhumasen09135, 11 months ago

Other than static can we use private keyword to change variable into class variable

Answers

Answered by sabhyata09
0

Class variables maintain a single shared value for all instances of the class, even if no instance object of that class exists. You would use the static keyword to change an instance variable into a class variable. Both instance and class variables are declared at the class level, not within methods

Similar questions