Complete the code to create a string variable named greeting.
String greeting = [1];Strings in Java are enclosed in double quotes. So, "Hello" is the correct way to assign a string literal.
Complete the code to compare two strings for equality.
if (str1.[1](str2)) { System.out.println("Strings are equal"); }
In Java, to check if two strings have the same content, use the equals() method.
Fix the error in the code to concatenate two strings correctly.
String fullName = firstName [1] lastName;In Java, the plus sign (+) is used to join strings together.
Fill both blanks to create a string and get its length.
String word = [1]; int length = word.[2]();
Strings are created with double quotes. To get the number of characters, use the length() method.
Fill all three blanks to check if a string starts with a letter and convert it to uppercase.
if (text.[1]("A")) { String upper = text.[2](); System.out.println(upper.[3]()); }
Use startsWith() to check the beginning of a string, toUpperCase() to convert to uppercase, and print it.
