private static void placeBid() { String ir = getRef(); double bid = 0; boolean correct = false; if (!ir.equals("cancel")) { while (!correct) { try { System.out.print("Please enter your bid in £ > "); String x = in.readLine(); bid = Double.parseDouble(x); correct = true; } catch (Exception e) { System.out.println("That's not correct"); } } System.out.println(a.placeBid(ir, loggedUser, bid)); } }