A: You tried to read past the end of a Scanner. Read the exception output text carefully and look for the first line that mentions your program. That's the line that is the culprit. For example:
Exception in thread "main" java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:838)
at java.util.Scanner.next(Scanner.java:1347)
at BabyNames.sillyMethod(BabyNames.java:39)
at BabyNames.main(BabyNames.java:15)
means that there's an error in sillyMethod
at line 39 of BabyNames.java
.