• Post Reply Bookmark Topic Watch Topic
  • New Topic

can java.lang.String.substring return a null  RSS feed

 
saran harini
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
will this method:
public String substring(int beginIndex, int endIndex)

in java.lang.String return a null in any situations. Is it required to check null as in the below case:

 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. But like the Javadocs tell you, it can throw an IndexOutOfBoundsException
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In future, please do take out time to CarefullyChooseOneForum
Your question has nothing to do with Ant. Moving....
 
saran harini
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.. By mistake it had fallen in ant forum..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!