Complaint about Java class package# Java - 爪哇娇娃
k*r
1 楼
Package information is stored in two places:
1. package declaration in class files
2. physical file location
This really goes against some design principles - you don't
want to store the same info twice and have to keep them in
sync if you change any of them.
For example, if you want to put a set of classes into a
different package, you would have to modify every single
source file, as well as physically move the files to a
different directory. Moving files is trivial but modifying
every single
1. package declaration in class files
2. physical file location
This really goes against some design principles - you don't
want to store the same info twice and have to keep them in
sync if you change any of them.
For example, if you want to put a set of classes into a
different package, you would have to modify every single
source file, as well as physically move the files to a
different directory. Moving files is trivial but modifying
every single