Java object-oriented programming--fourth chapter classes and objects

Source: Internet
Author: User

OO: Object-oriented

OOP: Object-Oriented Programming

OOA: Object-oriented Analysis

OOD: Object-oriented design

Structured programming: From top to bottom, break a big problem down into smaller tasks and then write a process for each smaller task. Finally, the programmer writes a main process to start the program flow, and then, depending on the program flow, invokes the desired other process.

An object is a concrete entity that exists, with clearly defined characteristics and behaviors.

All things are objects, and objects are produced by my attention.

Object-oriented: a way of knowing things, paying attention to the whole cognition of things, the most accord with the natural thinking habit of mankind.

objects are the result of data encapsulation.

A class is a collection of sets of objects that have the same properties and behavior.

In software systems, we use classes to simulate real-life entities.

A class is an abstraction of an object that is an instance of a class.

“.” is meant to access a member variable (that is, a property, a variable that describes the characteristics of an object).

The properties of different objects are independent of each other, and the change of an object's property value does not affect the properties of other objects. So the access to the property can only be through "object." The way to access it.

Static variables, which are independent of variables outside the object, are member variables shared by all objects, and when an object changes its value, all objects are affected. You can pass "object." The way to access, also through the "class name." Way to visit. So a static variable is also called a class variable.

NULL, indicating that the variable does not point to any object.

Garbage collection mechanism that reclaims objects that are not pointed to by any variables.

Java object-oriented programming--fourth chapter classes and objects

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.