0

Can anyone tell me the difference between these two?

javac-d.*.java vs javac.usingpackage.java

3rd Jun 2021, 7:06 AM
Atul [Inactive]
9 Antworten
+ 2
🅰🅹 🅐🅝🅐🅝🅣 please clarify this
3rd Jun 2021, 3:25 PM
Atul [Inactive]
+ 1
Atul packages are also a directory and there may be subdirectory.
3rd Jun 2021, 9:56 AM
A͢J
A͢J - avatar
+ 1
Atul Yes java is a main package and sub-packages are like util, lang, awt. That's why we use like: java.util.*; // here dot(.) star (*) means all classes. java.util.Scanner; //here we are importing single class. java.lang.Integer; java.lang.Long; java.awt.*;
3rd Jun 2021, 3:31 PM
A͢J
A͢J - avatar
3rd Jun 2021, 4:45 PM
Atul [Inactive]
0
Atul -d means directory and *.java means all java files exist in that directory so if you do like this then all java files will be compile. But if you compile your java file with package name then it will compile that file only.
3rd Jun 2021, 7:48 AM
A͢J
A͢J - avatar
0
Directory is the upper version of packages i.e is it a term referred to a group of packages?
3rd Jun 2021, 8:48 AM
Atul [Inactive]
0
Is a subdirectory equivalent to classes or in between classes and objects? And is it possible to use directory word in place of packages?
3rd Jun 2021, 10:58 AM
Atul [Inactive]
0
Atul packages are just use to organize classes and prevent name collision between same classes nothing else. Packages are like as directory and sub-packages are like sub-directory.
3rd Jun 2021, 11:04 AM
A͢J
A͢J - avatar
0
🅰🅹 🅐🅝🅐🅝🅣 If util and lang are sub package then java is a package means. Java stands at the greatest peak with its subdivisions starting from sub packages which we use?
3rd Jun 2021, 11:24 AM
Atul [Inactive]