Java Scanner Usage isNumeric(String str)

Here you can find the source of isNumeric(String str)

Description

is Numeric

License

Open Source License

Declaration

public static boolean isNumeric(String str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Scanner;

public class Main {
    public static boolean isNumeric(String str) {
        Scanner scanner = new Scanner(str);
        boolean flag = scanner.hasNextInt();
        scanner.close();/*  w  w w.  ja v  a  2 s.  c om*/
        return flag;
    }
}

Related

  1. getTimeAsInt(String duration)
  2. getTypedValue(String question)
  3. input(String message)
  4. input(String prompt)
  5. isInteger(String s)
  6. isValueValid(String value, String pattern)
  7. isYes(String str)
  8. iterate(final String node)
  9. joinSqlStatements(Collection scripts)