我有類IP。錯誤在類中的Java核心thu_nghiem
package DES;
public class IP
{
private int a[] ={58,50,42,34,26,18,10};
public void hoanvi(int x[])
{
int y[] = new int[7];
for(int i=0;i<7;i++)
y[i] = x[i];
for(int i=0;i<7;i++)
{
int z = a[i];
x[i] = y[z];
}
}
主我被軟件寫:
import DES.*;
public class thu_nghiem
{
public static void main(String[] args)
{
int a[]={58,50,42,34,26,18,10};
IP b = new IP();
b.hoanvi(a);
System.out.println(a[6]);
}
}
JVM messeage錯誤!爲什麼?
什麼是錯誤? – 2014-10-29 18:47:35