• + 1 comment

    Java Scanner class is like any class you create, except it was created for you. Since Java already comes with it, it had to be imported.

    Have you tried this: https://docs.oracle.com/javase/8/docs/api/java/util/Scanner.html

    When you develop programs, sometimes you do not have to bother with details cause then you ll end up focusing on a tree while ignoring the whole forest. If you want to go deeper and at lower programming level, you need to read how systems work at hardware level and how they manage inputs-outputs, a complicated topic that misses the point of this tutorial.

    To sum up, thats the whole point of creating "higher level" programming languages, to avoid the complexity and make our lives easier. Imagine back to the 70s' when people were programming in assembly. It was a real pain to even create a simple print program like this one here. You had to write many lines of assembly code.