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

1 Expert Approved Answer
Step: 1 Unlock

Exercise a txt Hello Everybody index txtindexe printThe index of ... View full answer

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 Programming Questions!