Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a new StringBuilder object.
Java
StringBuilder sb = new [1]();🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
2fill in blank
mediumComplete the code to append text to a StringBuilder.
Java
sb.[1]("Hello");
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
3fill in blank
hardFix the error in converting StringBuilder to String.
Java
String result = sb.[1]();🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
4fill in blank
hardFill both blanks to create a StringBuilder and append text.
Java
StringBuilder [1] = new [2](); [1].append("World");
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
5fill in blank
hardFill all three blanks to build a string and convert it to String.
Java
StringBuilder [1] = new [2](); [1].append("Hi"); String [3] = [1].toString();
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
