No questions yet
356 visits
Outline:Instance fields *Also known as non-static fields *Open the TestStudent class which we have created *Access the fields roll_number and name using dot operator *See the output *Initialize the field and see the output *Change the modifier of the fields to private *Debug the error that you get *Change the modifier to protected *Each object of a class will have unique values *Create two objects of the Student class
Instance fields *Also known as non-static fields *Open the TestStudent class which we have created *Access the fields roll_number and name using dot operator *See the output *Initialize the field and see the output *Change the modifier of the fields to private *Debug the error that you get *Change the modifier to protected *Each object of a class will have unique values *Create two objects of the Student class
Show video info
Pre-requisite