Java Object/ Class/ Object generating
📍Object
What is an object:
A Java object is a member of a Java class(Object is created from a class). Each object has properties and behaviors. The properties of an object is stored in variables, while methods display the object's behavior.
🔰For example in real life, Car is Object. The car has properties(variable) such as weight and color, and behavior(method), such as drive and brake.
🌟a class is the definition or template,and an object is an instance of that definition.
📍Create an object
🌟 You can create multiple objects of one class.
- In order to create an object, a class should be based(Because the coding implement of the object concept is the class), and the class to be based is called a "Class reference".
- The object must have a name(Need to give variable name).
- new keyword is definitely use to generate an object(new keyword-object generate - JDK pre-build).
- The constructor of the class reference is required.
- Class reference(left side) "assign" (=), Constructor(right side) "equal" (==).
#Study #Knowledge #Coding #Programming #SoftwareDevelopment #SkillBuilding

Comments
Post a Comment