What is the purpose of using package in java? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 6

What is the purpose of using package in java?

23rd Jan 2017, 4:48 PM
Ahmed Shah Malik
Ahmed Shah Malik - avatar
2 ответов
+ 2
for organising purposes. like, how we put all our music in the music folder, videos in another, etc. similarly, we put classes with similar tasks in one package and the rest in others.
23rd Jan 2017, 4:51 PM
Nikunj Arora
Nikunj Arora - avatar
+ 1
its useful if you have jar file. then you can import it, without package name, it will not work as expected
1st Feb 2017, 5:30 PM
Mohsen
Mohsen - avatar