What will be the output of the following program?
public class Classifier {
public static void main(String[] args) {
System.out.print(type('Z') + type('\'') + type('6'));
}
public static String type(char c) {
if ("0123456789".indexOf(c) >= 0)
return "Number ";
if ("abcdefghijklmnopqrstuvwxyz".indexOf(c) >= 0)
return "Letter ";
if ("\"'+-*/&|!=".indexOf(c) >= 0)
return "Special-Character ";
return "Incorrect ";
}
}