import module java.base; import module java.sql; import java.util.Date; // a single-type import wins over both module imports public class FixedDate { public static void main(String[] args) { Date d = new Date(0L); System.out.println(d.getClass().getName()); java.sql.Date s = new java.sql.Date(0L); // the other one is still reachable by its full name System.out.println(s.getClass().getName()); } }