How to understand the packages in Java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to understand the packages in Java?

what is the basic difference between the following? 1) import Java.io.*; import Java io.input/output stream

31st Dec 2016, 6:13 AM
Thirumalaisamy
Thirumalaisamy - avatar
2 Answers
+ 1
in first statement: using * in import statement, imports all classes in that package(java.io). second Statement : it import only particular class i.e. java.io.input/output stream
31st Dec 2016, 6:38 AM
Ravi Kumar
Ravi Kumar - avatar
+ 1
Thanks brother
31st Dec 2016, 6:40 AM
Thirumalaisamy
Thirumalaisamy - avatar