So I just started my Java class and I'm having a bit of trouble understand this. I have googled and looked in my book but I am just not getting it.
So my project starts out with
// declare an instance of Scanner to read the data stream from the keyboard.
Scanner kb = new Scanner(System.in);
Then the next line is
// say hello to the user and ask for the user’s name
System.out.print("Hello, please enter your name: ");
name = kb.nextLine();
Can I just get a really simple explanation or breakdown of what the first line which is creating a new scanner, what that does. And then what the
name = kb.nextLine();
What does that do, what is it referencing or creating. I am just really lost. Thanks in advance for all the help