2016-2017 201671010138 "Java Programming"

Source: Internet
Author: User

Friday a systematic learning and programming is a holistic upgrade and exercise, but if the previous learning

is not practical enough to be serious, you will feel overwhelmed, a little catch up with the rhythm. It also recognizes their own shortcomings and lack of

Point, the process is always increased because of additional, or less parentheses resulting in a program error. Before the experiment for classes and packages

The impression only stays in the concept, for its use and application are somewhat vague.

There is a new understanding of the scope of the package, before the definition of public and private still do not understand, so

Do the following summary.

The parts of a class that are marked public can be used by any class.

A part of a class that is marked private can only be used within a class.

If no pseudo-class, method, or instance field specifies the access control modifier public or private, this part can be

Access to all methods in the same package.

The problems that occurred last week were also the creation of packages and classes, and we could create classes and then introduce packages. When a source file

, all of the class files in this package must be placed in a subdirectory that matches the package name .

For a class, you can use all of the classes in its package directly, or you can use all the public classes from other packages.

There are two ways to access classes in other packages:

(1) The class name is preceded by the full package name; (2) Import a specific class

Each week has new tasks and learning progress, but also meet new problems, but in the course of the study in the week time is too tense

The understanding of theoretical knowledge is not thorough enough, it is also worthy of improvement and coordination of the place.

2016-2017 201671010138 "Java Programming"

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.