Question: JAVA , can anyone tell why its wrong ??? can you please fix it.... thanks. NOTE: You need only write the method. You do not

JAVA , can anyone tell why its wrong ??? can you please fix it.... thanks.

JAVA , can anyone tell why its wrong ??? can you please

NOTE: You need only write the method. You do not need to write the lass or any code to call or test the method 1.) Write a public method called findLastWord that takes a single paramatar of tupe String and returns a String yalue to the caller of the method 2.) The body of the method should extract the last word from the String that is passed into the methad and retum that word to the caller of the methad (You can assmethat the boundary or dellmeter between words are defined by a single space.) SUBMIT 8 of 8: Wed Aug 01 2018 17:11:25 GMT+ 1000 (Australian Eastern Standard Time) ? 3 public string findLastiord) String str String lastord str.substring(str.lostIndexof"+1); returnastord 12 13

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!