Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part Il - Short Answer /multiple choices 21. What is the output of the following

ID: 3590135 • Letter: P

Question


Part Il - Short Answer /multiple choices 21. What is the output of the following statement? (3 points) System.out.println ("boo boo boo" .replace ("oo", "OX") 22. What is the value of s2? (3 points) String s "I'm a super programmer!"; string s2 = s. replaceAll ("("a-zA-2]", ""); 23. W hat is the output of the following code segment? (Or indicate it won't compile) (5 points) class A f public A ( System.out.println ("Creating Object A") class B extends A f public void aMethod) System.out.println ("a method"); public class test f Bb=new B();

Explanation / Answer

21.) The given statement will print

box box box

As oo is replaced by ox.

22.) The given statement for s2 removes all other elements than alphabets. So, value of s2 will be

23.) The given code segment gives you the following error:

Code's link:

https://www.ideone.com/dQKLp8

Hope it helps, do give your valuable response.