samedi 6 mars 2021

How can verify the type of an input variable in java? [duplicate]

When i get a value by input, i wanna check what kind of value is for control it:

int age = input.next();
book.setAge(age);

if (age....) { // i wanna check if "age" in input it's a String or other
    type ...
}

Aucun commentaire:

Enregistrer un commentaire