Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

In Java, is it possible to check string startsWith with a List?

807603Oct 29 2007 — edited Oct 29 2007
Hi All,

for example i am having a string called "ONE". I'm having a list which has "ONE", "TWO", "THREE", "FOUR" etc.,

Now i want to check whether "ONE" is startsWith any one the string specified in the java.util.List.

In my case, it has to return true if "ONE" is given. if i give "NINE" it has to return false.

How can i achieve this in Java?

Thanks,
J.Kathir
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2007
Added on Oct 29 2007
15 comments
3,455 views