Fale pessoal, estou com um grave problema… observem: meprblema está em negrito.
package lista1;
import io.*;
public class Ex18 {
public static void main(String[] args) {
int[]vA = new int[10];
int[]vB = new int[10];
char id;
lervetor(vA, id=‘A’);
lervetor(vB, id=‘B’);
união(vA,vB);
// diferença(vA,vB);
// soma(vA,vB);
// produto(vA,vB);
// intersecção(vA,vB);
System.exit(0);
}
static void lervetor(int vet[],char ident){
int i;
for(i=0;i<10;i++)
vet[i]=InOut.leInt(“Informe o valor da posição [”+i+"] do vetor “+ident+”:");
}
static void união(int v1[], int v2[]){
String msg="";
int x=10, a, b;
boolean acrescenta=true;
int[] Delta = new int[x];
for(a=0;a<10;a++){
acrescenta=true;
Delta[a]=v1[a];
msg+="|"+Delta[a]+"|";
for(b=0;b<10;b++){
if(v1[a]==v2[b]){
acrescenta=false;
}
}
[b] if(acrescenta==true){
x++;
Delta[x]=v2;
msg+="|"+Delta[x]+"|";
}
}
InOut.MsgDeInformação(“UNIÃO”,“A união de Vetor A e Vetor B é:\n”+msg);
}
}
não consigo aumentar o tamanho da praga do vetor… alguém poderia me ajudar?