Question: Construct one program that completes the following 5 String exercises: a. Return theindex(position) of the first occurrence ofein the following string: String txt
Construct one program that completes the following 5 String exercises:
a. Return the index (position) of the first occurrence of "e" in the following string:
String txt = "Hello Everybody";
b. Use the correct method to print the length of the txt
String txt = "Hello";
c. Convert the value of txt to upper case.
String txt = "Hello";
d. Use the correct operator to concatenate two strings:
String firstName = "Mary "; String lastName = "Doe";
e. Return the index(position) of the first occurrence of "e" in the following string:
String txt = "Hello Everybody";
Step by Step Solution
3.35 Rating (158 Votes )
There are 3 Steps involved in it
Exercise a txt Hello Everybody index txtindexe printThe index of ... View full answer
Get step-by-step solutions from verified subject matter experts
