Java Reading notes Two

Source: Internet
Author: User

Here are some of my reading notes:

I studied the object-oriented:

Object-oriented conforms to the general law of human beings ' view of things, the implementation details of the object's methods are packaged, only the implementation of the object method knows the details.

I think the process is composed of process, step, function, process is the core, object-oriented is object-centric, first class, get objects, through the mutual communication between objects to achieve the function, process-oriented is the first algorithm, after the data structure,

Object-oriented is the first data structure, and then there are algorithms.

And then there are some important ones:

The main method is static. public static void Main (string[] args)

The source code must have the same file name as the public class.

A. class file is generated when the code is compiled.

Numeric type:

Integer: Byte (1), short (2), int (4), Long (8)

Float type: Float (4), double (8)

Character type: Char

Boolean Type: Boolean

The initial value of the byte, short, int, long type is 0

The initial value of the float, double type is 0.0

The initial value of the Boolean type is False

Variable name in Java: The underscore, letter, and $ symbol begin with an underscore, a letter, a $ symbol, and a number that cannot begin with a number.

The Java string is not a character array, but rather a char* pointer.

Two strings can be spliced with a + sign.

Detect string equality:

Use the Equals method to detect whether two strings are equal.

A constructor is a method that is used by the system to generate an object when it is generated using a class.

The construction method does not return a value. The format is: Public method name. The method name of the constructor method is the same as the class name.

The constructor method is called automatically during the object generation process and cannot be invoked with instructions.

Java Reading notes Two

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.