fork download
  1. class Main {
  2. public static void main (String[] args) {
  3. String x = "1234";
  4. System.out.println(Character.isDigit(x.charAt(0)));
  5. x = "a123";
  6. System.out.println(Character.isDigit(x.charAt(0)));
  7. }
  8. }
  9.  
  10. //https://pt.stackoverflow.com/q/111739/101
Success #stdin #stdout 0.06s 32168KB
stdin
Standard input is empty
stdout
true
false