Java Learning Note 6

Source: Internet
Author: User

Learn the Java package, the important some of the record down, of course, there are lessons, hey

I. The role of the package: Managing Java files, resolving file conflicts with the same name

two. Define packages: Package name
must be placed in the first line of the Java source program
the "." can be used between package names Separated


three. Packages in the system:

java. (function). (Class)
Java.lang. Class (Class) containing the Java language Foundation
Java.util. (Class) contains various tool classes in the Java language
java.io. Class (Class) containing input, output-related functions


Four. Use of the package:

1. You can use a class from another file in one file by using the Import keyword.
in 2.Java, the package naming conventions are all lowercase letters spelled
3. Not only can you load all the files under a package when you use eg:com.imooc.*
You can also load all files under a specific sub-package

Java Learning Note 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.