上面的代码是在Objec.class文件里的,单步调试进去看到的
解决方案 »
- 几个刚刚从事java工作的奋斗者建群。。。。
- 如何往数据库读取和存储二进制文件?
- <<<<<<jbuilder无法显示汉字
- 菜鸟题---用一个线程的两个按钮控制另一个线程的wait()和notify() ,程序如下,实现不了
- 为什么使用clone()的类要implements Cloneable?
- 请问国外热门的java论坛是哪个?
- 多个tomcat启动问题 非端口占用
- 请各位回答我几个分布式的问题!!!!!!!!!!!
- 关于排序问题的困惑!!在线等待!!!分数不够还可以加啊!!!急急
- java中,想用Vector实现查询数据库,然后表格输出,怎么查询界面不能输出表格,连表格头都输不出来??
- JNA调用DLL--Struct里有个HWND不知道怎么转换
- java如何存储老挝语
* {@inheritDoc}
*
* <p>This implementation iterates over the specified collection,
* checking each element returned by the iterator in turn to see
* if it's contained in this collection. If all elements are so
* contained <tt>true</tt> is returned, otherwise <tt>false</tt>.
*
* @throws ClassCastException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
* @see #contains(Object)
*/
public boolean containsAll(Collection<?> c) {
Iterator<?> e = c.iterator();
while (e.hasNext())
if (!contains(e.next()))
return false;
return true;
}
/**
* Returns <tt>true</tt> if this list contains the specified element.
* More formally, returns <tt>true</tt> if and only if this list contains
* at least one element <tt>e</tt> such that
* <tt>(o==null ? e==null : o.equals(e))</tt>.
*
* @param o element whose presence in this list is to be tested
* @return <tt>true</tt> if this list contains the specified element
*/
public boolean contains(Object o) {
return indexOf(o) >= 0;
} /**
* Returns the index of the first occurrence of the specified element
* in this list, or -1 if this list does not contain the element.
* More formally, returns the lowest index <tt>i</tt> such that
* <tt>(o==null ? get(i)==null : o.equals(get(i)))</tt>,
* or -1 if there is no such index.
*/
public int indexOf(Object o) {
if (o == null) {
for (int i = 0; i < size; i++)
if (elementData[i]==null)
return i;
} else {
for (int i = 0; i < size; i++)
if (o.equals(elementData[i]))
return i;
}
return -1;
}
处理办法:1 String[] 封装成 对象, 重写对象的hash、equals方法(有序排列)。 2 自己拿出来比较