June 2025
Intermediate to advanced
1129 pages
53h
English
To show you how to implement modules practically, let’s create two new Maven Java projects, along with the necessary module info files.
Now, we’ll create a new Maven project with the coordinates com.tutego:candytester:1.0 . The project should contain the following simple class:
package com.tutego.insel.candy;import java.util.*;public class YummyTester { public static boolean testYumminess( String name ) { return List.of( "ding ding tong", "meiji", "balikutsa", "pez", "gumballs" ) .contains( name.toLowerCase( Locale.ROOT ) ); }}
Listing 15.2 com/tutego/insel/candy/YummyTester.java
The Maven project has the following simple Project Object Model (POM) file:
<?xml version="1.0" ...Read now
Unlock full access