Java - Write code to Check if the supplied value is a double

Requirements

Write code to Check if the supplied value is a double

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        String value = "book2s.com";
        System.out.println(isDouble(value));
    }/*  ww  w.j a v  a 2 s . c  om*/

    /**
     * Checks if the supplied value is a double
     * @param value String to be checked
     * @return true if the value is a double, false otherwise
     */

    public static boolean isDouble(String value) {
        try {
            Double.valueOf(value);
        } catch (NumberFormatException e) {
            return false;
        }
        return true;
    }
}