class GFG { public static void main(String[] args) { try { String str EQUALS args.length>0? args[0]: ""; // returns the double value // represented by the string argument double val EQUALS Double.parseDouble(str); // prints the double value System.out.println("Value EQUALS " + val); } catch (Exception e) { System.out.println(e); } } }