For final year UG/PG girls in Chemistry & related fields: Get industry-ready with a certified training program in the chemical sector with We-Chemie.Click here for more details. Apply here!
No questions yet
486 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