Question: Write a method public static double readDouble(String prompt) that displays the prompt string, followed by a space, reads a floating-point number in, and returns it.
Write a method
public static double readDouble(String prompt)
that displays the prompt string, followed by a space, reads a floating-point number in, and returns it. Here is a typical usage: salary = readDouble("Please enter your salary:");
percentageRaise = readDouble("What percentage raise would you like?");
Step by Step Solution
3.46 Rating (166 Votes )
There are 3 Steps involved in it
import javautilScanner public class DoubleInput public ... View full answer
Get step-by-step solutions from verified subject matter experts
