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
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()
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()