I am new to OOP concepts, but I will try my best.
Yes, instance variables are variables with ordinary data types, but they appear in a specific instance of an OBJECT object. An instance variable is a variable that describes the "Feature" or "Property" of an object. for example carColor, carName can be an instance of the Car class variable, because it describes the characteristic of a car object.
When a new object is created with the keyword "new", all instance variables are automatically bound to the object and can be tracked separately. eg
var carA = new car carA.carName = "Honda" carA.carColor = "Blue"
var carB = new car carA.carName = "Austin" carA.carColor = "Red"
Pradeep kalugade
source share