I was looking at someone's else code and they code it using package names.
String filename = "";
java.io.PrintWriter writer;
writer = new java.io.PrintWriter(new java.io.FileWriter(filename));
Is the syntax the equivalent had it not been coded with package name? Is there any use coding it with package names since Java allows it?
You have to use the package names (or "fully-qualified names" - this refers to the package name and the class name together) if:
import
the classes you're using for whichever reason. (Usually insanity.)import
ed the classes but are still using the package names anyway because I don't know.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With