I have made this code:
public static void main (String []args){
Lexico lex = new Lexico();
String cadena = JOptionPane.showInputDialog("Ingrese la cadena: ");
System.out.println(lex.ingresarCadena(cadena));
}
String[] Ecuacion1;
public String ingresarCadena(String cadena)
{
String c ="";
Ecuacion1 = cadena.split("(\+|\-|\*|\=|\%|\/)");
for(int i = 0; i < Ecuacion1.length; i++)
{
System.out.print(Ecuacion1[i]);
}
return c;
}
but I want to make a method that tells me if there are whole numbers in that vector.