0

My question is that what is ".in" in system.in and i am not understandin the workin of System.in suppose

Scanner obj=new Scanner(System.in);

plz understand me the working of upper line.

2
Contributors
1
Reply
19
Views
2 Years
Discussion Span
Last Post by JamesCherrill
0

in is a public constant in the System class. It refers to an InputStream object that gets the input from the console.

Here's part of the API doc for the System class:

public static final InputStream in

The "standard" input stream. This stream is already open and ready to supply input data. Typically this stream corresponds to keyboard input or another input source specified by the host environment or user.

Edited by JamesCherrill

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.