preciso comparar dois vetores e fiz o código abaixo, porém não esta funcionando, vocês sabem o motivo?
package com.mycompany.mavenproject1;
import javax.swing.JOptionPane;
/**
*
* @author...
*/
public class pgm12_prova {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int[] vet1;
vet1= new int[5];
int i;
int [] vet2;
vet2= new int [5];
for (i = 0; i < vet1.length; i++)
{
String s_vet1 = JOptionPane.showInputDialog(null, "Informe os valores do primeiro vetor:");
vet1[i] = Integer.parseInt(s_vet1);
}
for (i = 0; i < vet2.length; i++)
{
String s_vet2 = JOptionPane.showInputDialog(null, "Informe os valores do segundo vetor:");
vet2[i] = Integer.parseInt(s_vet2);
}
if(Arrays.equals(vet1,vet2))
JOptionPane.showMessageDialog(null,"os valores do VET1 e vet2 sao iguais");
}
}