有两个String数组.需要比较里面元素值是否相同.需详细比较.但顺序不限制.如:
[code="java"]
String[] strs = new String[]{"1","2","2"};
String[] strs1 = new String[]{"1","2","3"};
[/code]
这样是成功的.再如:
[code="java"]
String[] strs = new String[]{"1","3","2"};
String[] strs1 = new String[]{"1","2","3"};
[/code]
这样顺序不同,但也是相同的.再如
[code="java"]
String[] strs = new String[]{"1","2","2"};
String[] strs1 = new String[]{"1","2","3"};
[/code]
这样是比较不成功的.
大家帮忙看看有什么好的办法比较.多谢~