What would the output be given the following. Assume it's part of a class that is executed. The order of the output valu
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What would the output be given the following. Assume it's part of a class that is executed. The order of the output valu
What would the output be given the following. Assume it's part of a class that is executed. The order of the output values matters. Note: there are no errors in this code. public static void main(String[] args) { String str = "sphinx of black quartz judge my vow": for (int i = str. length() - 1; i >= 0; i--) { boolean check = checkLetter(str.charAt()); if (check) { System.out.println(str.charAt(i)); ) ) ) private static boolean checkLetter(char inletter) { switch(inLetter) { case 'a' case 'e case 'o' case u return true; default: return false; }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!