Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how do i get substring?

 
Gemini Moses
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String S = filename.ext
I need the "ext" part of this string.
How can I get that?
Thanks
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like this:

Check out the API for java.lang.String and java.lang.StringBuffer for more methods.
 
Gemini Moses
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jessica for your quick help.
I am done with my code!!
Thanks a lot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic