Import all subpackages at once in Java

Is it possible to immediately import all subpackages into Java?

As I understand it, this is possible in C #:

C # how to import namespaces immediately

+3
source share
1 answer

No.

import javax.swing.*;

will only import classes into the package javax.swing. It will not import subpackages such as javax.swing.event. Each subpacket will require a separate import:

import javax.swing.event.*;
+8
source

Source: https://habr.com/ru/post/1787981/


All Articles