Limited access

Upgrade to access all content for this subject

What is printed by the following Java code? Consider consulting the Java API for Strings to understand the different methods that are used.

String str1 = "Hello";
String str2 = "World";
String str3 = str1 + " " + str2 + "!";
String str4 = str3.substring(3, 9);
String str5 = str4.split(" ")[1];
String str6 = str5.concat("d");
String str7 = str6.toUpperCase();
Select an assignment template