1public static void main(String[] args) {
2 double amount=0.0;
3 try {
4 amount = Double.parseDouble(txtMonth.getText());
5 } catch (Exception e) {
6 System.err.println("ups, this was not castable to double");
7 amount=-10.0;
8 }
9 System.out.println("Here is the double: "+ amount);
10}