B 2.1.2 Worksheet Java Answers
Declare a string variable named text with the value "Hello, world!".Extract the substring "world" and print it. Declare a string variable named email with an email address (e.g., "[email protected]").Find the position of the "@" symbol and print it. Declare a string variable named sentence with the value "This is a sentence.".Replace all occurrences of " " with "_" and print the modified sentence.