Well your code didn't import scanner like the tutorial suggested. I'm not sure why it didn't recognize scanner with my code but try switching java.util.*; with java.Scanner;. Otherwise I'm not quite sure why it won't work