23.6.2021 |

String.formatted


    //since 1.5
    public static String format(String format, Object... args) { ... }
    
    String.format("Not allowed to access %s due to '%s'", entity.getSimpleName(), message) 
   
    //since 15
    public String formatted(Object... args) { ... }

    "Not allowed to access %s due to '%s'".formatted(entity.getSimpleName(), message)
Zur Übersicht

Mehr vom Devsquad...

Sven Röttering

A Trip through the Type Jungle

Simon Jakubowski

Intellij database change preview