Could you please tell me the difference between subSequence and subString in java.
Santosh Kumar V.K
I am assuming that you are referring to the methods of the java.lang.String class?
If so, then the javadoc is a good place to start here.... basically, the two methods do the same thing. In fact, I believe subSequence() calls subString(). And the reason is also explained in the JavaDoc.
santhosh kumar vk wrote: Could you please tell me the difference between subSequence and subString in java.
One is a method of String; the other a method of CharSequence (which is newer) and, since String implements CharSequence (at least since Java 1.4), it must implement subSequence() and, as has already been mentioned, its implementation is identical to substring().
Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here