Cita:
public static void main(String[] args) throws IOException
{
int N,j,p,i;
int V1[]= new int [30];
int V2[]= new int [30];
int V3[]= new int [30];
Random rn = new Random();
BufferedReader entrada=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Dame el total de numeros a ordenar: ");
N=Integer.parseInt(entrada.readLine());
for(i=0;i<N;i++)
V1[i]=i+1;
for(j=1; j<=N; j++)
{
do
{
p= rn.nextInt(40);
} while(V1[p] !=0);
V1[p]=j;
}
j=1;
for(i=0; i<N; i++)
{
V2[i]=j;
j++;
}
j=N;
for(i=0; i<N; i++)
{
V3[i]=j;
j--;
}
public static void BubbleSort(int A[], int N)
{
int i,j,aux;
for(i=0; i<N; i++)
for (j=N-1; j>i+1; j--)
{
if(A[j] < A[j-1])
{ aux=A[j];
A[j]=A[j-1];
A[j-1]=aux;
}
}
}
{
int N,j,p,i;
int V1[]= new int [30];
int V2[]= new int [30];
int V3[]= new int [30];
Random rn = new Random();
BufferedReader entrada=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Dame el total de numeros a ordenar: ");
N=Integer.parseInt(entrada.readLine());
for(i=0;i<N;i++)
V1[i]=i+1;
for(j=1; j<=N; j++)
{
do
{
p= rn.nextInt(40);
} while(V1[p] !=0);
V1[p]=j;
}
j=1;
for(i=0; i<N; i++)
{
V2[i]=j;
j++;
}
j=N;
for(i=0; i<N; i++)
{
V3[i]=j;
j--;
}
public static void BubbleSort(int A[], int N)
{
int i,j,aux;
for(i=0; i<N; i++)
for (j=N-1; j>i+1; j--)
{
if(A[j] < A[j-1])
{ aux=A[j];
A[j]=A[j-1];
A[j-1]=aux;
}
}
}
De Antemano Muchas gracias por su ayuda.