How SubString works in Java

Tutorials Shared by the Internet Community

Advertisements


Synopsis

Subtring method is defined in String class in java.lang package and used to create small strings from a big string. how Substring method works intern

Statistics

  • Total Hits - 16318

  • Total Votes - 97 votes

  • Vote Up - 42 votes

  • Vote Down - 55 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Core JAVA

  • Submitted By - Javin Paul

  • Submitted on - 2011-11-04 15:48:05

Description

Subtring method is defined in String class in java.lang package and used to create small strings from a big string. how Substring method works
internally is a tricky part and can lead to some subtle programming bug and memory leak if not understood correctly. This article explains how
Substring method works and where Sub-string is beneficial and where its not. This article is not only good from interview point of view but also from performance perspective to avoid some serious mistakes while using substring in Java. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements