Half-Day Online Pilot Workshop on AutoDock4 on 9 August 2024, 2:00 pm to 5.30 pm. Click here to register.

Instance fields - English

11823 visits


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