Tp4 Java to check