wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Test a specific char in a string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Test a specific char in a string" Watch "Test a specific char in a string" New topic
Author

Test a specific char in a string

Robert Brown
Greenhorn

Joined: Apr 02, 2009
Posts: 4
Ok I have a few strings however I want to test each character, I know I need to run it through a loop and all but how can I look at each individual character if it is in a string?
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
If you look at the documentation for java.lang.String, you should find a method that returns the char at a specified index in the String


Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Robert Brown
Greenhorn

Joined: Apr 02, 2009
Posts: 4
Thank you very much just what I needed
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Test a specific char in a string