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. Join the three initialized Strings string1, string2, and string3. Count the number of white spaces in the complete string. Use toUpperCase() and replaceAll("\\s", "") methods to convert string into Upper Case and remove all white Spaces from the string. Count the number of letters in the string. Find the first occurrence of S, U, I, T in the String and return indices of S, U, I, T.
: 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.
- Join the three initialized Strings string1, string2, and string3. Count the number of white spaces in the complete string.
- Use toUpperCase() and replaceAll("\\s", "") methods to convert string into Upper Case and remove all white Spaces from the string.
- Count the number of letters in the string.
- 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";
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images