我正在编写这个程序,我想我已经写了所有东西,但是它会弹出“.class”,我不明白为什么。请帮我。谢谢。
import java.util.*;
public class JoinArrays
{
public static void main(String[] args)
{
int[] x = { 5, 4, 3, 2, 1};
int[] y = { 8, 7, 6};
int[] z;
int i;
System.out.println("Original arrays:");
display(x);
display(y);
z = joinArrays(x, y);
System.out.println("Result of join(x,y).");
display(z);
}
private static void display( int[] x )
{
int i;
System.out.print("Array: ");
for(i=0; i < x.length; i++)
{
if( i < x.length-1 )
System.out.printf("%3d, ", x[i]);
else
System.out.printf("%3d\n", x[i]);
}
}
public static int[] joinArrays(int[] x, int[] y)
{
int i;
return int x[i] + int y[i];
}
}