In Java, a String in a switch statement is handled by comparing its value against the case labels using the equals() method. Starting from Java 7, the switch statement supports String values. The program checks the String value and matches it with one of the case labels. If a match is found, the corresponding block of code is executed. If no match occurs, the default block (if provided) will be executed.