Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String getPrice(String aPrice){
- double price;
- try{
- price = Double.parseDouble(aPrice);
- if (price == Integer.parseInt(aPrice)){
- errorMessage += "Price must be a double\n";
- }
- }catch(Exception ex){
- errorMessage += "Price must be a double\n";
- }
- return aPrice;
- }
Add Comment
Please, Sign In to add comment