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. hello after working with this code i got the follw
View Tutorial          By: Tapaswini Sabat at 2011-11-05 12:43:49

2. FINALLY! A place that gives complete examples (wi
View Tutorial          By: bminton at 2013-03-19 00:15:55

3. Can you give me an example to create InetAddress f
View Tutorial          By: Vaibhav at 2009-12-15 23:37:49

4. Even i got d same error. can u plz tell me where t
View Tutorial          By: Priya at 2011-03-14 12:16:54

5. Hi Blackpanther, the mode is either 0 or 1. If you
View Tutorial          By: Ramlak at 2008-04-01 02:24:14

6. it is nice but please give simple example like are
View Tutorial          By: red at 2009-12-03 23:07:37

7. doesn't work with 3 , 7 and 5 but with numbers hig
View Tutorial          By: asd at 2013-05-11 09:25:30

8. The !isset() is basically checking if the string i
View Tutorial          By: Bijan at 2012-09-21 20:49:41

9. /** Example shows garbage collector in action

View Tutorial          By: sreekar at 2010-05-08 07:58:09

10. Thanks, it was really helpful.
But wouldn't

View Tutorial          By: Ron at 2010-06-27 14:22:36