Witam, chciałbym zeby wyswietliło mi wartości wspólne z dwóch tablic a nie moge wpasc na pomysl jak to zrobic.Prosze o pomoc.
Mój kod:
public class Cw22{
public static void main(String[] args){
int[] tab1 = {3, 2, 1, 4, 6};
int[] tab2 = {1, 2, 4, 3, 4, 5};
for(int i=0; i<tab1.lenght; i++){
for(int j=0; j<tab2.lenght; j++){
if(tab1[i]==tab2[j]){
}
}
}
}