Use Java to implement Object-Oriented Programming-java learning notes, object-oriented programming-java
Use Java to implement Object-Oriented Programming
Object oriented program)
All objects: everything in the world can be used as a type to help us solve the problems that need to be solved.
Programs are a collection of objects, and they send information to tell each other what to do: When we need to use a type to instance an object to solve the problem, it is like to say to that type, I want to reference a feature of yours, and then he says yes.
You need to instance a my object (some do not need it because it has already been provided ).
Object-Oriented Programming is designed and developed using "realistic simulation methods.
The process of object-oriented design is an abstract process. Based on business needs, we focus on business-related attributes and behaviors, ignoring unnecessary attributes and behaviors, objects in the real world abstract the objects in software development ".
Class: Abstract by multiple objects. It refers to a type of real life.
Object: a specific instance of a class. It is a one-to-one relationship and a ing of the real world in a program.
Constant: in java, final is used to declare that this is a constant. It indicates that this is final and can be referenced but cannot be modified. The constant name specification is capitalized.
1 public final class Test {2 // The class modified by finla cannot be inherited but can be inherited by instance 3 final int NUMBER = 0; // This is a constant 4 final void method () {} // This is a final modifier method. 5 // The final modifier method cannot be overwritten but can be referenced. 6}
Update again... I just got started with the code for one and a half years. I have a lot of knowledge to learn or be incorrect. If the programmer sees something wrong, I still have a better understanding. Hope you can give me some advice. Don't confuse others with the incorrect learning materials.