Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started