hi, i'm kinda digging in java and I just stopped by using packages. Honestly I think the way it works is stupid, why I write it here is because I'm stupid idiot and it is quite possible that i'm wrong and it has something to it and in that case I want to know about it.
OK, the deal is: Why is there a keyword "package" ?(I know what should it do, i'm questioning the need of it's existence)
As I found out, if you define some class as part of a package, say the name of the package is A, and the class is imported in some other class and you want to compile the class with javac, you have to move the class from package A to a directory of the same name.
Why bother with writing "package" at the beginning of every class if in the end you will need to create a special dir for it? Why is the filesystem by itself not sufficient to group those classes? Why can't it work like #include in C? Javac doesn't produce any binaries anyway so why make it more complex than that? As I see it the keyword package alone does nothing except it makes you write more complex build xmls...