For unlimited access to Study Guides, a Grade+ subscription is required.
22. What prints when the following code executes? public static void main(String[] args) { String s = "word"; mystery(s); public static void mystery (Strings) { String t = ""; for (int i=0; i
23. What is the value printed by the program to the right? A-1 BI C. 2 D.3 E. 6 void setup() { int[] data = 7, 10, 3, 10, 6, 7, 5, 10, 10 System.out.println(funcl (5, data)); int funcl (int x, int[] data) for (int i = 0; i < data.length; i++) if (data[i] < x) return i; return -1;
20. How many times does the letter D print in the following code? for (int i = 0; i < 3; i++) { for (int j = i+1; j < 3; j++) System.out.println("D"); { (A) 3 (B) 0 (C) 6 (D) 1 (E) 2