This is needed to store and then later print the name that is entered in by the console.
Sorry! I found my error....
I was using String name = console.Stringnext();
instead of
String name = console.next();