Unknown input

Report a typo

Correct the code so it doesn't throw an exception.

Write a program in Java 17
class Util {
// correct this method to avoid NPE
public static void printLength(String name) {
System.out.println(name.length());
}
}
___

Create a free account to access the full topic