import java.util.Scanner;
public class JavaApplication13 {
public static void main(String[] args) {
int i, j, aux, tamA, tamB;
Scanner s = new Scanner (System.in);
System.out.println("Digite a quantidade de elementos do seu vetor A: ");
tamA=s.nextInt();
System.out.println("Digite a quantidade de elementos do seu vetor B: ");
tamB=s.nextInt();
int VA[] = new int [tamA];
int VB[] = new int [tamB];
int VC[] = new int [tamA+tamB];
System.out.println("Digite seu vetor A: ");
for(i=0;i<tamA;i++)
VA[i]=s.nextInt();
System.out.println("Digite seu vetor B: ");
for(i=0;i<tamB;i++)
VB[i]=s.nextInt();
for(j=0;j<tamA;j++)
{
for(i=0;i<tamA-1;i++)
{
if(VA[i]>VA[i+1])
{
aux=VA[i];
VA[i]=VA[i+1];
VA[i+1]=aux;
}
}
}
for(j=0;j<tamB;j++)
{
for(i=0;i<tamB-1;i++)
{
if(VB[i]>VB[i+1])
{
aux=VB[i];
VB[i]=VB[i+1];
VB[i+1]=aux;
}
}
}
System.out.print("Vetor A ordenado: ");
for(i=0;i<tamA;i++)
System.out.print(VA[i]+" ");
System.out.println();
System.out.print("Vetor B ordenado: ");
for(i=0;i<tamB;i++)
System.out.print(VB[i]+" ");
System.out.println();
}
}
Eu consegui concatenar o Vetor 1 e o Vetor 2, mas a resolução ideal do exercício é fazer um terceiro vetor que já imprima pra mim o vetor 1 e 2 concatenado...

