Java Basic Course Learning notes (6)

Source: Internet
Author: User

1: Two-dimensional Array (understanding)(1) The element is an array of one-dimensional arrays. (2) Format: A: Data type [] [] Array name = new data type [m][n];B: Data type [] Array name = new data type [m][];C: Data type [] Array name = new data type [][]{{...},{...},{...}};D: Data type [] Array name = {{...},{...},{...}}; Note the differences defined below: int[] x,y[]; equivalent to int[] x; int[] y[];(3) Case (Master): A: Two-dimensional array traversal B: Sum of two-dimensional arrays C: Yang Hui triangles two-dimensional array format 2 ( {{...}},{...},{...}; ) in memory plots two-dimensional array format 3 (new data type [m][]; ) in memory plots 2: Two study Questions (understanding)(1)   Parameter passing problem in Java only value is passed in Java. Basic type: The change of formal parameter does not affect the actual parameter reference type: The change of formal parameter directly affects the actual parameter (2) The small case of data encryption problem synthesis. diagram of parameter passing problem in Java 3: Object-oriented (mastering)  (1) Object-oriented   object-oriented is a process-oriented programming idea    process-oriented: Emphasizing the steps of each feature   object-oriented: Emphasizing the object and then invoking the function by the object   (2) object-oriented thought characteristics   A: A thought that is more in line with our thinking habits   B: Simplifying complex things   C: Let's turn from performer to conductor    example:    buy computer     wash clothes     Cooking    ...    All objects   (3) Putting elephants into refrigerators (understanding)   A: Process-oriented   B: Object-oriented implementation    Note: How to make our operations more consistent with object-oriented thinking?  A: What are the classes   B: What are the members of each class   C: Class-to-Class relationships   (4) Classes and Objects   class: is a set of related properties and behaviors. is an abstract concept.   object: Is the concrete manifestation of this kind of thing. Specific existence of the individual.   A: Things in the real world     Properties Basic description     Behavioral functions   B:java the most basic unit of the language is the class. So, we're going to use classes to represent things   C: Classes     member variables things properties     Member methods thing behavior   D: class: Is a set of related properties and behaviors. is an abstract concept.     object: is the concrete existence of this kind of thing, is a concrete example. (object)        Example:    Student: Class     Squad Leader: Object   (5) class definition and use   A: class definition     member variable The definition format is the same as before, where the location is different, in the class, outside the method.     Member method definition The format is the same as before, which is to remove the static.   B: Use the contents of the class    a: Create an object? Format     Class name Object name =  new class name ();   b: How to use member variables and member methods    Object name. Member variables     object names. Member method ()   (6) Case:  A: definition and use of student class   B: Definition and use of mobile phone class   (7) memory diagram   A: Memory diagram of an object   B: Memory diagram of two objects   C: Memory diagram of three objects   (8) Java program Development, design, and features   A: development: Is the creation of objects, through the object call function   B: Design: is to manage and maintain the relationship between objects   C: Features    a: encapsulation    b: Inheritance    c: polymorphic

Java Basic Course Learning notes (6)

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.