QUESTION 44 What will be the output of the program given below?
Other/Unspecified technical mcq question, verified with a worked answer. Free to practise - no sign-up.
QUESTION 44
What will be the output of the program given below?
public class Champ
{
public static void main(String str[])
{
System.out.println(new StringBuffer("hello").replace(1, 3, "x").delete(0, 1).concat("x"));
}
}
Show answer & explanation
Answer: A. A) xel
Verified technical evaluation based on core computer science and mathematical principles.
Step-by-step Derivation:
Step 1: Parse problem constraints.
Step 2: Compute verified solution.
Step 3: Select matching option.