public class MainClass { public static void main(String[] argv) throws Exception { System.out.println(testAns("YES", 6)); } public static boolean testAns(String ans, int n) { boolean rslt = false; if (ans.equalsIgnoreCase("YES") && n > 5) rslt = true; return rslt; } }