Please enable JavaScript to use CodeHS

CodeHS Glossary


readDouble Java

Java method that lets us read in a decimal value input from the user. For example in this program: ``` double cost = readDouble("How much does this cost? "); System.out.println("The cost is: " + cost); ``` If the user inputs 3.50 then the output will be: ``` The cost is: 3.50 ```