11, Java classes and objects

Class: A set of things to be described with common characteristics of
objects: class on a specific object (instance) is called an object

Integrated relationship (general and specific)
aggregation relationship (whole and partial)
to achieve the relationship
of object-oriented thinking Dian 3
1, face the problem must first consider the question of how many classes and how many objects;
2, consider these classes and objects which have methods and properties;
3, with between classes and what kind of relationship;
Java and object-oriented
core Java runtime object, the Java program "all things are subject."
Objects can be regarded as static objects (member variables) and dynamic properties (method) of the package.
Classes are used to create objects of the same type of "template", it defines the class object should have the member variables and methods in a class.
J2SDK provides many classes your own classes for programmers to use, programmers can also be defined.

Why target?
Object-oriented programming - a set of objects communicate with each other through the completion of specific features
of all the paradigm of the real issues are abstract
compilation is an abstract machine language
language is process-oriented compilation of abstract
objects more in line with real-world problems for abstract
objects have external services interfaces
can be reused through inheritance with
internal objects hidden service implementation
can be reused by gathering
object-oriented easier to make us hard to achieve in pursuit of the realm of these
Reusable (multiplexing), Extensibility (extension), maintenance and replacement More convenient,. . .
Components - than abstract (binary level) on the object higher level
EJB, Web service, CORBA, COM ,. . .

Guess you like

Origin www.cnblogs.com/hlc-123/p/11027068.html