IDEA modifies Import not to improt * as separate import, importimprot

Source: Internet
Author: User

IDEA modifies Import not to improt * as separate import, importimprot
When refactoring the code, the landlord used IDEA to find that when importing a class, it became Improt xxx. xxx. * What should I do if I don't allow the Import * method because the landlord's company is amazing and there are too many businesses involved? As a result, the landlord successfully set the Import attribute. Here we will share with you.


1. First, search for Import in the Search Settings




2. Select "Java Import" in "ClassCount to use import *" as shown in to Increase the number. Successful




[JAVA] import an interface. What is the equivalent of import? (Not implements)

Java import is equivalent to introducing the name. For example, import org. eclipse. core. runtime. IAdaptable; after the introduction, "org. eclipse. core. runtime. IAdaptable" can be abbreviated as IAdaptable in the current java file. In short, it is to write convenience...

() Change the relationship between java package and import

I think the relationship between your package and import is unclear.

A package is a tool for creating class groups. After the package hierarchy is created, you can use these hierarchies to access specific classes in each package.

When a class you write needs to call the class members written in another file, you need to import the class path, that is, the hierarchy of the class, use import to start with an object.

There are two methods: one is to import all the members of the package where the class is located, that is, the package path. * method: import all the classes in the package, and of course import the classes you need. Another method is to import the required classes, that is, the package path. class Name.

In addition, classes in the same package do not need to be imported repeatedly, because they are also in the same hierarchy after compilation, and the system can recognize them.

Related Article

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.