Tag: unusedvariables

  • Java 21 – Unnamed Patterns and Variables

    Java 21 – Unnamed Patterns and Variables

    Let’s say you have declared a variable in your Java program. But you are not going to use it for some reason. May be you declared an exception variable in a catch block but not going to use the variable at all: Or in a for loop statement: Or in Pattern Matching of Records (introduced…