i was told to write a program to test if the value is digit or not .. import java.util.Scanner;
public class Test_For_Digit {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
System.out.println("enter any value of your choice ");
double n = input.nextDouble();
if (n >=0){
System.out.println("you enter digit which is = " + n);
}
else{
System.out.println("you eneter = " + n + " and its not a digit");
}
}
} if i press alphabet it will trigger an error help me out