*
The moose likes Java in General and the fly likes has contain method for String? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "has contain method for String?" Watch "has contain method for String?" New topic
Author

has contain method for String?

sam cen
Greenhorn

Joined: Nov 10, 2002
Posts: 5
How do test whether a string contain charater 'a' or 'b' for example?
just want to check with all of you about, does JKD provide contain method for Sting,
Or I need to do coding for this.
thanks
Sam
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

indexOf will return the index of the first position of the character, or -1 if it was not found.
Dave
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

Check out the JDK 1.4 API for more details.
And remember the String class is immutable, so if you're doing a lot of String manipulation, the StringBuffer class is much more efficient and better suited.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: has contain method for String?
 
Similar Threads
ArrayList.get - cast to String problem
is there a any validation API in java
How to change Date Format
Object & String
invoking a string