Ad
Code
Diff
  • public class AbbreviateTwoWords {
    
      public static String abbrevName(String name) {
        return "%s.%s".formatted(name.charAt(0), name.charAt(name.indexOf(" ") + 1));
      }
    }
    • public class AbbreviateTwoWords {
    • public static String abbrevName(String name) {
    • return name.replaceAll("[^A-Z\\s]","").replaceAll("\\s",".");
    • return "%s.%s".formatted(name.charAt(0), name.charAt(name.indexOf(" ") + 1));
    • }
    • }
public class Kumite {
  public static boolean boolCheck(boolean[] bools) {
    return bools[0] ? bools[1] || bools[2] : bools[1] && bools[2];
  }
}