Question: Algorithms and proplem solving java program Exercise#1: Complete the following program to do the following: import java.util.Scanner; public class Mystery { public static void main(String[]

Exercise#1: Complete the following program to do the following: import java.util.Scanner; public class Mystery { public static void main(String[] args) { Scanner read = new Scanner (System.in); String sentence= "now is the time to enjoy programming." //Complete here// a. Change the first character to uppercase. b. Change every 't' to 'T'. Hint: use their position in the sentence. c. Print the length of the sentence. d. Print the index of the second 'i' in the sentence. e. Print the sentence in capital letters. f. Use method(s) from the String class to change the sentence to "Now is the time to work hard". Hint: use substring and concat methods g. Print the substring from position 5 to 14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
