This shows you the differences between two versions of the page.
java:util:scanner:nextdouble [2013/04/10 09:01] 94.223.12.247 created |
java:util:scanner:nextdouble [2024/02/16 01:12] (current) |
||
---|---|---|---|
Line 5: | Line 5: | ||
double scanned from the input | double scanned from the input | ||
- | ===== example nextDouble ===== | + | ===== example nextDouble in java ===== |
<code java> | <code java> | ||
package scanner; | package scanner; | ||
Line 22: | Line 22: | ||
System.out.print("Please enter the amount (with decimal places) a of Change done to: "); | System.out.print("Please enter the amount (with decimal places) a of Change done to: "); | ||
- | currency = scan.nextDouble(); // read currency | + | currency = scan.nextDouble(); // read keyboard buffer |
System.out.println("Currency is " + currency); | System.out.println("Currency is " + currency); |