Comment on Tutorial - Using substring( ) in Java By Fazal



Comment Added by : Fazal

Comment Added at : 2008-09-12 20:17:53

Comment on Tutorial : Using substring( ) in Java By Fazal
Hi puru, The syntax is substring(int startIndex, int endIndex). Therefore you should pass two integer numbers to this method. The first one indicates the starting index and the second one indicates the ending index. For example, if you want to take the substring 'He' from the String 'Hello' then you would specify substring(0,2) which means start from the first character and finish after the second character.

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. not satisfied friend. for Socket class it asks to
View Tutorial          By: Gaurav at 2009-01-28 07:34:42

2. why are we using it ch = str.charAt(i);
View Tutorial          By: Rumman at 2014-10-10 19:42:42

3. lots of thanks for this given example........hope
View Tutorial          By: virgi crisostomo at 2010-08-18 17:18:08

4. its very helpful for us...and useful too.
View Tutorial          By: roy at 2011-06-15 15:32:22

5. its very good example explains what is an abstarct
View Tutorial          By: sandeep at 2012-01-06 07:13:29

6. can help me for program in java Tomorrow I have ex
View Tutorial          By: blasm at 2013-06-21 06:59:41

7. It would be nice to add the line,


View Tutorial          By: Anonymous at 2009-08-30 07:59:10

8. Sorry about this. I cannot run this program becaus
View Tutorial          By: TanSW at 2008-04-28 20:14:20

9. I agree with BHAGYALAXMI. I faced the same problem
View Tutorial          By: Alok at 2010-01-10 12:03:37

10. Hi
I tried to use this on a windows 7 32 b

View Tutorial          By: Asela at 2012-01-26 18:35:57