I am currently encountering the following situation in my main program:
public static void main(String[] args) {
Scanner wen= new Scanner(System.in);
int numeroCuenta;
int i;
System.out.println("BIENVENIDO! ");
System.out.println("Favor ingrese el número de cuenta ");
numeroCuenta=wen.nextInt();
int vector[] = new int[5];
if(numeroCuenta == vector.length) {
System.out.println ("NIP aceptado:"+numeroCuenta);
} else {
System.out.println ("El numero debe tener 5 digitos");
}
}
Why can not I retrieve "vector.length"? Thanks in advance. Greetings.