Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In a program on java, I am to take the first index of a substring and the last index of a substring Input = #fet
In a program on java, I am to take the first index of a substring and the last index of a substring
Input = #fet value; #ret value; #tet value;
Now from this I am supposed to take the substring: #fet value; and get the index of "#fet" and ";". My issue is that I don't know how to the last.IndexOf(";") without getting the actual last ";". Typing int x = input.lastIndexOf(";"); just gets me the index of the actual lst";" instead of the one after #fet value. I need to do this for every one of the substrings.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started