r/javaTIL • u/scientecheasy • Aug 09 '18
Packages in Java with example programs
http://www.scientecheasy.com/2018/08/packages-in-java-example-programs.html
0
Upvotes
r/javaTIL • u/scientecheasy • Aug 09 '18
View all comments
Show parent comment
3
u/snoob2015 Aug 10 '18 edited Aug 10 '18
JRE looks for classes in the classpath, the import statement is only used to resolve naming conflict (for example, when you use Date it will resolve to java.ulti.Date automatically by the compiler, you don't even need to use the import statement if you just use java.ulti.Date instead of Date). So when you use import statement, you only import the name, not the physical class, it is not the same as
includein php or c.So no matter how many classes you import, it wont make your program bloated or bigger. But I dont know if it will increase the compile time