Java Beginner Notes-Object oriented

Source: Internet
Author: User

1. Understanding of the object.

It is objective, tangible, has its own properties and methods

The understanding of the class.

It is a collection of a large number of objects, the generality of a large number of objects abstracted out

Create the class. Member variables (with default values), member methods

creating objects, referencing objects

When an instance variable and a local variable conflict, the local variable takes precedence

2. Methods

Understanding the difference between common methods and construction methods, the overloading of construction methods

The characteristics of the construction method: the same as the class name, no return type;

Automatically called, no manual calls, and can only be called once

It is divided into construction code fast, no parameter construction, the parameter structure, the default empty construction method

3. Pass the This keyword to the value in the program

4. String connection StringBuffer sb= new StringBuffer ();

Sb.append ("Sun");

Sb.append ("Shuai");

System.out.println (SB);

String judgments

Common methods String split[] (); delimiter

Java Beginner Notes-Object oriented

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.