The website cannont display the page - an HTTP 500 error
Post Today 1:57:48 PM Subject: having problems with scanner variables
Welcome to the Ranch
You need to give your variables good and descriptive names (as well as CapitalLettersInClassNames). Have a look at these conventions. See if you can find the misprint where they have exchanged the words variables and constants. If you had called the Scanner object scan or input, rather than name, you would not have tried to print it out. Because you called it name, you got confused about its meaning, and that long line is what you get when you try to print the Scanner object.
I think there is a much better way to get the String than you have been told, based on the rule of thumb that you should declare local variables as late as possible; you do not need the name variable before you fill it with the input from the Scanner. That also avoids the dangerous practice of tolerating variables pointing to null.
You can get an output similar to what you had like this: System.out.println(input);