From 6b758bd58cfd697764d19fc38e51b2886b0b84ac Mon Sep 17 00:00:00 2001 From: Chris Mayfield Date: Mon, 29 Jun 2020 16:37:35 -0400 Subject: [PATCH] fix Scanner bug --- ch06/Strings.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ch06/Strings.java b/ch06/Strings.java index ac6bc05..f8b40f0 100644 --- a/ch06/Strings.java +++ b/ch06/Strings.java @@ -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