Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

Describe the economies of scale of M&A.

Answered: 1 week ago