[BAEL-3518] Removed the CheckIntegerInput because its removed from the article (#8228)
This commit is contained in:
parent
442d82ac66
commit
b9e46ff27a
|
@ -1,18 +0,0 @@
|
||||||
package com.baeldung.isnumeric;
|
|
||||||
|
|
||||||
import java.util.Scanner;
|
|
||||||
|
|
||||||
public class CheckIntegerInput {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
try (Scanner scanner = new Scanner(System.in)) {
|
|
||||||
System.out.println("Enter an integer : ");
|
|
||||||
|
|
||||||
if (scanner.hasNextInt()) {
|
|
||||||
System.out.println("You entered : " + scanner.nextInt());
|
|
||||||
} else {
|
|
||||||
System.out.println("The input is not an integer");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue