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[]

Algorithms and proplem solving
java program
 Algorithms and proplem solving java program Exercise#1: Complete the following program

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!