For a top‐down migration, all modules other than named modules are ____________ modules and on the ____________.
Paul Clapham wrote:That snipped compiles just fine for me (I just tried it). Perhaps you're confusing compiler errors with runtime errors? The compiler doesn't throw exceptions when it reports on errors.
Which of the following code snippets about var compile without issue when used in a method? (Choose all that apply.)
Junilu Lacar wrote:It has to do with the package declarations and the classpath settings when you run your tests.
By convention, the package structure that you create under src/test mirrors the package structure under src/main. You also declare your *Test classes to be in the same package as the class under test. This way, you can even reference members in your production code that have package-private (default) access.
When running tests, the test class output directory is added to the classpath in addition to the production class output directory. As a result, even though the two may be entirely separate physical directories in the file system, to the Java Runtime as long as the classes are declared to be in the same package, they will be loaded and treated as being "together" in the same package.