write a java program with the class name student and create an instance variable with the name roll no , create two object for this class and in the second object increase the roll no by 5
Answers
Answered by
0
Answer:
An instance variable is a variable which is declared in a class but outside of constructors, methods, or blocks. Instance variables are created when an object is instantiated, and are accessible to all the constructors, methods, or blocks in the class. Access modifiers can be given to the instance variable.
Similar questions