Simply put the Java basics in front of you, then start the object-oriented journey.objects (object):In short, the world is made up of objects, all things visible.classes (Class):To put it bluntly is to have the same characteristics or attributes as a class of objects with: Static properties: Properties, variables and other dynamic characteristics: methods, namely the function of simple example: a person as an object, has the attributes of height, gender, age, etc., with methods such as eating, learning and so on, and humans can be regarded as the object of the class The class in Java is the keyword for the classes. The above description can be abbreviated with Java code: public class person {String name;int age ; void Eat () { } Void Study () { }}
After the class is created, to take advantage of the created class, that is, to create an object instantiation, similar to the previous basic data type declaration like Person p=new ();p Erson as the class name, p is the new object, so P has the properties and methods in the People class. public class test{public static void Main (string[] args) {person p=new person (); P.eat (); This shows that when the object is instantiated, p acts as an object in the person class and can invoke the property or method of the person class. Personal Summary: In class, the properties and methods are written, and then in the main function, the object instantiation, you can make the relevant property method calls. It is important to object-oriented thinking, in the late learning, programming in the actual life of some examples, rather than to write programs and write code, to follow certain logic.
From for notes (Wiz)
"Java Development" object-oriented preliminary understanding and basic concept explanation