What's the difference between requires and requires static module statements in module declaration?
For example:
module bar {
requires java.compiler;
requires static java.base;
}
The primary difference between the two is that in case of
requires static foo.module;
The dependence is mandatory in the static phase, during compilation, but is optional in the dynamic phase, during execution while on the other hand
requires bar.module;
Is added to declare that the module depends, by name, upon some other modules, at both compile time and run time.