Hello guys, if you want to learn about Scanner class in Java, one of the most popular class to read input from command prompt or console then you have come to the right place. In this article, I will explain how to read input from command prompt, what is Scanner class and how you can use Scanner class to read various data types like String, int, long, boolean directly from console. You must have heard about famous nextInt(), nextDouble() methods which can read integer and double values from command prompt or console. But, before we get to the 10 best examples that will teach you everything you need to know about scanner class in Java, let me tell you a little bit more about what it really is.