public class QuestionChecker {
// Using a switch expression (Java 14+) for maximum performance
private static boolean isQuestionWord(String word) {
return switch (word) {
case "what", "who", "where", "when", "why", "how",
"is", "are", "was", "were"...