Complete the code to create a new String with the value "Hello".
String greeting = new String([1]);The correct way to create a String with the value "Hello" is to use double quotes around the text.
Complete the code to create a String variable named name with the value "Alice".
String name = [1];To assign a string literal to a variable, use double quotes around the text.
Fix the error in the code to correctly create a String with the text "Java".
String lang = new String([1]);The string must be enclosed in double quotes to be valid in Java.
Fill both blanks to create a String variable called message with the value "Welcome".
String [1] = new [2]("Welcome");
The variable name should be 'message' and the class name is 'String' with uppercase S.
Fill all three blanks to create a String variable named text with the value "Code" using the constructor.
String [1] = new [2]([3]);
The variable name is 'text', the class is 'String', and the string literal must be in double quotes.
