Computer Science, asked by nikita8480, 11 months ago

What is the significance of '*' while importing a package? ​

Answers

Answered by smartbrainz
9

Using (*) asterisk wildcard character in the import statement will all the available types consist of a particular package.

Explanation:

If you import java.io.* the compiler will look at all classes in the java.io package when it needs to find a class you are using.

It means you import the class which is included in Java Input Output package those class which is used in our implementation class like FileOutputStream, FileReader, etc.

Similar questions