Comment on Tutorial - indexOf( ) and lastIndexOf( ) in Java By Hong



Comment Added by : Mike

Comment Added at : 2010-10-14 20:09:31

Comment on Tutorial : indexOf( ) and lastIndexOf( ) in Java By Hong
To "need help":

String str = "xR-MxR-MHelloxR-M";
System.out.println(str.substring(str.lastIndexOf("M", 15)+1, str.lastIndexOf("x")));

;-)


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. the above code works fine for. May someone help wi
View Tutorial          By: T.T at 2012-02-23 06:22:36

2. Nice example..i m working on android and i want to
View Tutorial          By: Pranav at 2012-04-25 07:00:48

3. This has tread error , copy and paster hole code a
View Tutorial          By: Daniel at 2015-01-21 16:24:36

4. how to calculate total value more item
View Tutorial          By: balaji at 2011-01-06 23:52:50

5. hi ..........
the code is worked for me....

View Tutorial          By: pradeep at 2012-01-25 06:30:14

6. its nice explanation.
View Tutorial          By: rahul ahuja at 2010-06-13 22:33:35

7. #include<iostream>
#include<conio.

View Tutorial          By: Zohaib Farooq at 2011-05-23 07:58:44

8. i added respective code to the Manifest in every c
View Tutorial          By: niko at 2013-04-19 18:23:41

9. nice one superb..
View Tutorial          By: Rajesh B at 2011-02-01 21:59:56

10. Hi ! do u know have use FileOutputStream in Surfac
View Tutorial          By: lukas at 2011-07-18 16:55:20