Skip to content

Commit

Permalink
fix Scanner bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMayfield committed Jun 29, 2020
1 parent af3f177 commit 6b758bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ch06/Strings.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public static void main(String[] args) {
System.out.print("Enter a number: ");
}
double number = in.nextDouble();
in.nextLine(); // read the newline

// String iteration

Expand Down

0 comments on commit 6b758bd

Please sign in to comment.