我的代码怎么会报这样的错误呢?问题出在哪里了?求解决
public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
public final void java.lang.Object.wait() throws java.lang.InterruptedException
Exception in thread "main" java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.itheima.Test1.main(Test1.java:29)
作者: 刘松703 时间: 2013-12-19 18:10
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
public class Demo1 {
public static void main(String[] args) throws Exception {
List<Integer> list = new ArrayList<Integer>(); //定义Integer泛型
35
public boolean java.util.ArrayList.add(java.lang.Object)----
public void java.util.ArrayList.add(int,java.lang.Object)----
public java.lang.Object java.util.ArrayList.get(int)----
public java.lang.Object java.util.ArrayList.clone()----
public int java.util.ArrayList.indexOf(java.lang.Object)----
public void java.util.ArrayList.clear()----
public boolean java.util.ArrayList.contains(java.lang.Object)----
public boolean java.util.ArrayList.isEmpty()----
public int java.util.ArrayList.lastIndexOf(java.lang.Object)----
public boolean java.util.ArrayList.addAll(int,java.util.Collection)----
public boolean java.util.ArrayList.addAll(java.util.Collection)----
public int java.util.ArrayList.size()----
public java.lang.Object[] java.util.ArrayList.toArray(java.lang.Object[])----
public java.lang.Object[] java.util.ArrayList.toArray()----
public boolean java.util.ArrayList.remove(java.lang.Object)----
public java.lang.Object java.util.ArrayList.remove(int)----
public java.lang.Object java.util.ArrayList.set(int,java.lang.Object)----
public void java.util.ArrayList.ensureCapacity(int)----
public void java.util.ArrayList.trimToSize()----
public int java.util.AbstractList.hashCode()----
public boolean java.util.AbstractList.equals(java.lang.Object)----
public java.util.Iterator java.util.AbstractList.iterator()----
public java.util.List java.util.AbstractList.subList(int,int)----
public java.util.ListIterator java.util.AbstractList.listIterator(int)----
public java.util.ListIterator java.util.AbstractList.listIterator()----
public java.lang.String java.util.AbstractCollection.toString()----
public boolean java.util.AbstractCollection.containsAll(java.util.Collection)----
public boolean java.util.AbstractCollection.removeAll(java.util.Collection)----
public boolean java.util.AbstractCollection.retainAll(java.util.Collection)----
public final void java.lang.Object.wait() throws java.lang.InterruptedException----
public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException----
public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException----
public final native java.lang.Class java.lang.Object.getClass()----
public final native void java.lang.Object.notify()----
public final native void java.lang.Object.notifyAll()----
1
abc 作者: Crist 时间: 2013-12-19 18:10