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. haii , i am fully happy by searching all component
View Tutorial          By: AJEET KUMAR DALEI at 2011-04-23 21:20:00

2. Can u please help me. I run the SerialConnection p
View Tutorial          By: Praseetha.K at 2009-01-23 09:34:35

3. hi i am studying java course.i am new to java, ple
View Tutorial          By: Rajeshkumar at 2011-11-14 08:30:29

4. Hey is there any way to export datagrid to crystal
View Tutorial          By: Anu at 2009-05-08 13:11:48

5. in statment -
new Treeset<String> (ne

View Tutorial          By: Siddhesh Khedekar at 2009-10-27 00:14:17

6. Good examples. However... I am testing for a Hex v
View Tutorial          By: Doug Whitehead at 2008-11-29 17:10:43

7. super
View Tutorial          By: Dhana at 2007-01-30 03:21:00

8. Its working ,but it overwrite the old one when run
View Tutorial          By: venkat at 2012-09-17 09:38:53

9. Declaring int result within the method will change
View Tutorial          By: Soph at 2013-02-06 06:11:39

10. Very good explanation . i understood easily
View Tutorial          By: whyte at 2014-03-25 10:12:00