In java, why is it mandatory for each class to declare the package to which it belongs. I mean, the hierachy package has already been described / applied using the file system structure folder. It seems to me that the line:
package com.mypackage;
As the first line of each class is somehow redundant information. But I'm sure there is a good reason for him to be there.
source
share