I have two different String array.
String[] str1={(ABC),(CDE),(DEF),(FGE),(ERT)};
String[] str2={(ABC),(FGE)};
I wanna know is str1 have str2's all members?How can i search str2 in str1?
Create one Set object for each of your arrays containing the elements of the array. Then use the Set class's containsAll method to check that the one Set contains all of the elements from the other Set.
http://download.oracle.com/javase/6/docs/api/java/util/Set.html
Set (i.e. a structure with fast contains check) for the bigger array, for the other one a List (like Arrays.asList()) works too without loosing efficiency. (And it should be a HashSet or TreeSet. Most efficiently if you can reuse it instead of recreating it for each search.)
"ABC", instead of(ABC), etc.?