How can I say the following:
while(input is not an int){
do this
}
I tried this code but I know it's wrong:
int identificationnumber;
Scanner sc3 = new Scanner(System.in);
identificationnumber = sc3.nextInt();
while( identificationnumber != int){ // this line is wrong
Scanner sc4 = new Scanner(System.in);
identificationnumber = sc4.nextInt();
}
Any suggestions please.Thanks.