public class StringOperations {
public static void main(String[] args) {
String str1 = "Hello";
String str2 = "World";
String concatenated = str1 + " " + str2;
System.out.println("Concatenated: " + concatenated);
System.out.println("Length: " + concatenated.length());
System.out.println("Uppercase: " + concatenated.toUpperCase());
System.out.println("Lowercase: " + concatenated.toLowerCase());
System.out.println("Substring (0-5): " + concatenated.substring(0, 5));
System.out.println("Char at index 1: " + concatenated.charAt(1));
System.out.println("Contains 'World': " + concatenated.contains("World"));
System.out.println("Replaced 'World' with 'Java': " +
concatenated.replace("World", "Java"));
}
}