Search a String Array in Java?

后端 未结 2 1459
终归单人心
终归单人心 2021-01-20 23:01

How do I search a string array with start with keyword?

for example,

String[] str = { \"abcd\", \"abdc\", \"bcda\"};

when my search str

2条回答
  •  囚心锁ツ
    2021-01-20 23:49

    You should check this method:

    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#contains%28java.lang.CharSequence%29

提交回复
热议问题