Question: Consider the code below. Which of the following statements will create a String object with the value must and should replace the missing line
Consider the code below. Which of the following statements will create a String object with the value "must" and should replace the missing line of code? StringBuilder build1 = new StringBuilder ("a mustang"); char [] dest= new char [buildi.length()]; /* missing line of code */ String res = new String (dest); A) dest = buildl.getChars (2, 6, 0); B) build1.getChars (2, 6, dest, 0); C) buildl.getChars (2, 6); D) buildl.getChars (0, 4); E) build1.getChars (2, build1.length());
Step by Step Solution
There are 3 Steps involved in it
The detailed answer for the above question is provided below B build1getChars2 6 dest 0 Explanation ... View full answer
Get step-by-step solutions from verified subject matter experts
