Consider this Scanner
input example.
Scanner user_input = new Scanner( System.in );
Here Scanner
is the CLASS.
System.in
- "in" is object of class InputStream which is defined as static variables in class "System" which is used to read data from the console. In short "System.in" gives you a instance of of type InputStream.
When we create a Scanner class object we need to pass "System.in" as parameter in Scanner class Constructor. So basically using "System.in" Scanner class becomes able to read the data from console and then using different methods which are provided by Scanner class (like nextInt(), nextLong(), next() etc.), we can get data in the form of our desired datatypes (like int, double, String etc.).