Tag: member function represents abstract own age unit operation parameter input
The core idea of Java, object-oriented thinking.
The highest level of Java-oriented objects is the object of everything.
Objects: In reality, things can be called objects, objects are physical things, people, birds, tables, trees, buildings and so on. Object also has its own property behavior, and attribute behavior is divided into dynamic behavior and static behavior. The person's age name sex height and other properties are static, people can sing, swim, cry and other behaviors are dynamic.
An object is an entity used to describe an objective thing in a system, which is a basic unit of a system. It is also composed of some basic properties and some methods of manipulating these properties.
A class is a vector of object properties and behaviors (methods), and entities that have the same properties and behaviors (methods) are called classes.
The first letter of the class name is capitalized, and the method variable name is lower case.
Differences between classes and objects:
1, the class is abstract, the concept, represents a kind of things, such as human, birds and so on.
2, the object is concrete, actual, represents a specific thing.
3, the class is the object template, the object is an individual, an instance.
A member method (member function) of a class defines:
Public returns a data type method (function) name (argument list) {
statement;//method (function) body
}
Parameter list: member function input
Data type (return type): Represents the member function output
Function Body: Represents a block of code in order to implement a function
Java Object Oriented thinking