Question: Give a string str=a string at following location, what will be the return from following method calls? str.indexOf(ing); str.lastIndexOf(ing); str.substring(3,7); What is the difference between

  1. Give a string str=a string at following location, what will be the return from following method calls?
    1. str.indexOf(ing);
    2. str.lastIndexOf(ing);
    3. str.substring(3,7);
  2. What is the difference between the replace method in String class and StringBuilder class?
  3. In split methods argument, when do you use []?
  4. What is wrong with the following code and how can we fix it?

ArrayList score = new ArrayList();

NEED ANSWER IN JAVA

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!