Object-oriented "into the JAVA-3.2" H5 Cattle and cattle platform for lease

Source: Internet
Author: User

Object-oriented overview h5 beef cattle Platform for lease (h5.hxforum.com) Contact 170618633533 Penguin 2952777280 source Sale Room Card Sale Backstage Rental interested parties private chat buckle

What is object-oriented (oriented programming): The idea of dividing a class as a functional module is object-oriented design

The class is independent and does not belong to a class, and when the main function wants to do something, it passes the corresponding thing to the various classes that contain the corresponding function modules.

The corresponding data is then returned to the main function via the interface.

An object-oriented act is a conductor.

What is the process oriented: the design idea of dividing function into function module is process-oriented.

All the steps are done by one person at a time.

All functions are the main function to complete the steps

For example, to buy food

1. Go out

2. Walk

3. To the vegetable market

4. Buy Vegetables

Class:

Abstract some things that have the same attributes (characteristics) and methods (behaviors) into one class.

For example: People

Characteristics (attributes): Two eyes, one mouth

Behavior (method): Walk, run, jump, sing the national anthem

Class is a general term, the class is like a design drawing, and the object is concrete existence, can be used directly.

A class is a concept that is abstract.

An object is a concrete entity that exists.

A class can create multiple objects, each of which has no effect on the properties and behavior of each object.

Grammar:

class{

The class name and file name to be consistent, the first letter to uppercase, if the class name is more than one word composition, then the first letter of each word to

}

Definition of a property (a variable of a member):

Data type data name = "Initialize":

There can be no initialization, which is a variable in a class, not a variable in a method.

Behavior (method):

Statics is static;

Syntax of the method:

public static return type [void] Method name (data type parameter name ...) {

[Return Data]

}

Note: Classes are abstract and cannot be used, but you can create objects based on classes

Syntax for creating objects:

Class Name Object name (variable name) =new class name ();

How do I assign a value to a specific property in a class?

Grammar:

The name of the object. property name = value;

Object-oriented "into the JAVA-3.2" H5 Cattle and cattle platform for lease

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.