public class Hii
{
public static void main(String args[])
{
int []a2;
int j,s;for(int i=0;i<=9;i++)
a2[i]=i;
for(i=0;i<9;i++)
for(j=i+1;j<=9;j++)
if(a[i]<a[j])
{s=a[i];
a[i]=a[j];
a[j]=s;}
for(int i=0;i<=9;i++)
System.out.println("a2[i]");
}我应该怎样改?
{
public static void main(String args[])
{
int []a2;
int j,s;for(int i=0;i<=9;i++)
a2[i]=i;
for(i=0;i<9;i++)
for(j=i+1;j<=9;j++)
if(a[i]<a[j])
{s=a[i];
a[i]=a[j];
a[j]=s;}
for(int i=0;i<=9;i++)
System.out.println("a2[i]");
}我应该怎样改?
{
public static void main(String args[])
{
int []a = {1,2,2,2,5569,48,7,8,9};
int s;for(int i=0;i<9;i++)
for(int j=i+1;j<9;j++)
if(a[i]<a[j])
{s=a[i];
a[i]=a[j];
a[j]=s;}
for(int i=0;i<9;i++)
System.out.println(a[i]);
}
}