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



Comment Added by : Kyle

Comment Added at : 2012-03-22 09:17:04

Comment on Tutorial : indexOf( ) and lastIndexOf( ) in Java By Hong
ASNWERING: what's the purpose of indexOf('t',10) ?

The purpose is to look for the index of the character 't' STARTING at index 10;

For instance:
String str = "hello world";
//Let's say you wanted to find the index of the second 'o'.
//You say:
System.out.println(str.indexOf('o',5));
//This searches the string for 'o' starting immediately after
// first 'o'. (Remember, Strings are simply arrays, and their
// indexes start out at 0.


View Tutorial



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. Thank you! :) But I have a question, why is that t
View Tutorial          By: choco at 2010-01-03 02:16:18

2. hi,
Very nice tutorial. But please I have s

View Tutorial          By: hemn at 2010-04-17 06:02:00

3. its nice example for beginers
View Tutorial          By: Ramesh at 2012-02-15 18:13:09

4. If i run this program----



View Tutorial          By: pratham at 2010-09-22 10:10:11

5. nice work.......
View Tutorial          By: sukirti at 2011-05-06 16:30:19

6. THANX FOR THE INFO....
View Tutorial          By: Abhinaykumar at 2010-07-06 11:34:53

7. it s good ,understanding clearly and with out conf
View Tutorial          By: vasudeva kumar at 2012-01-06 14:04:30

8. easy.......
View Tutorial          By: Suman at 2011-07-20 07:04:28

9. Hi,
Any body tell me how to these execute t

View Tutorial          By: mari at 2009-07-09 02:02:12

10. hi any one can send me the code for HTTPclient pro
View Tutorial          By: indela at 2011-06-13 08:41:12