Page 1 of 1

Question 15 (10 points) What will the following code segment print? String s= "John Baugh is awesome"; String[] sArr = s

Posted: Tue Jul 05, 2022 10:26 am
by answerhappygod
Question 15 10 Points What Will The Following Code Segment Print String S John Baugh Is Awesome String Sarr S 1
Question 15 10 Points What Will The Following Code Segment Print String S John Baugh Is Awesome String Sarr S 1 (65.36 KiB) Viewed 9 times
Question 15 (10 points) What will the following code segment print? String s= "John Baugh is awesome"; String[] sArr = s.split(" "); for (int i = sArr.length - 1; i >= 0; i--) { System.out.println(sArr); } Note: You may not use a calculator or compiler with this problem. awesome is Baugh John John Baugh is awesome
John is awesome Baugh John Baugh is awesome
Question 16 (5 points) When a primitive variable is automatically enclosed in an object (reference type), this is called O immediate enclosure auto-encapsulating auto-boxing auto-signing
Question 17 (5 points) Which of the following methods is inherited by all classes in Java from Object (either directly or indirectly)? hasNext() println() parseInt() toString()