I have this error"String index out of range: 14
at java.lang.String.substring(Unknown Source)"
I am unable to find the mistake in my code. A little help would be great.

Just trace through and figure out how str.substring(index2,index2+length2) would end up with a position beyond the length of 'str'.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.