Question: Write a java program that count the number of letters in a String and find the first occurrence of S, U, I, T in the

 Write a java program that count the number of letters in

Write a java program that count the number of letters in a String and find the first occurrence of S, U, I, T in the String and return indices of S, U, I, T. (a) Join the three initialized Strings string1, string2, and string3. Count the number of white spaces in the complete string. (b) Use toUpperCase() and replaceAll("\\s", "'") methods to convert string into Upper Case and remove all white Spaces from the string. (c) Count the number of letters in the string. (d) Find the first occurrence of S, U, I, T in the String and return indices of S, U, I, T. Strings are given below: String string1 "Globalization and Information Technology continue to process at a dramatic = pace" String string2 = "To answer the demand of a changing society Pakistan higher education system needs to shift its focus from individuals who simply absorb knowledge to those who are able to creatively utilize knowledge to excel in unfamiliar situations"; String string3 "These creative individuals should be able to track situation from new perspective break into new field excel in crisis management and be rich in ingenuity"; The sample output format is as follows: Count of white Spaces or blanks is: 67 A: 33 B: 8 C: 17 D: 15 E: 44 F: 8 G: 9 H: 12 I: 41 J: K: 5 L: 17 M: 10 N: 320: 31 P: 6 Q: R: 17 S: 24 T: 34 U: 11 V: 5 W: 7 X: 2 Y: 6 Z: 2 count the first occurence of S: 53 count the first occurence of U: 44 count the first occurence of I: 7 count the first occurence of T: 10

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!