Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (5.3k points)

It is much more convenient and cleaner to use a single statement like

import java.awt.*;

than to import a bunch of individual classes

import java.awt.Panel; import java.awt.Graphics; import java.awt.Canvas; ...

What is wrong with using a wildcard in the import statement?

1 Answer

0 votes
by (9.5k points)

The problem with it is that it clutters your local namespace.

Related questions

0 votes
1 answer
asked Apr 14, 2021 in Java by dante07 (13.1k points)
0 votes
1 answer
asked Feb 27, 2021 in Java by dante07 (13.1k points)

Browse Categories

...