static int n=Integer.parseInt(JOptionPane.showInputDialog(null,"introduzca
un
numero para verificar si es primo"));
public boolean calcularNumero(int dividendo,int divisor,int aux) {
//cocientes,calcular numero primo,dudas con divisor
int dividendo1=aux;
divisor=dividendo;
aux=divisor;
int numero3=dividendo/divisor;
if (numero3==divisor && numero4==divisor) {
return primo=true;
}
else if (numero3==aux && numero4==aux) {
return primo=true;
}
return primo;
}
public boolean esPrimo(int n) {
for(int i=2;i<n;i++) {
if(n%i==0)
return false;
}
return true;
}
public static void main(String[] args) {
Scanner ent = new Scanner(System.in);
Arrays_aelatorio arra=new Arrays_aelatorio();
arra.esPrimo(n);
System.out.println("el valor del numero para saber si es primo"+arra);
// the output on the screen is the following one @ followed by numbers // the value of the number to know if it is primohola.Arrays_aelatorio@323b36e0