public static void main(String[] args) {
// Declare File object
// initialize the scanner
Scanner scan = new Scanner(System.in);
int x = 0;
// iterate through the tokens
while(scan.hasNext()){
// print int tokens
if(scan.hasNextInt()){
x = scan.nextInt();
break;
}
else{
System.out.println(scan.next());
}
}
scan.close();
System.out.println("Número lido"+ x);
}