What is system.in

前端 未结 9 1086
隐瞒了意图╮
隐瞒了意图╮ 2021-02-06 05:50

Consider this Scanner input example.

Scanner user_input = new Scanner( System.in );

Here Scanner is the CLASS.

9条回答
  •  被撕碎了的回忆
    2021-02-06 06:37

    System.in is actually an InputStream typically connected to keyboard input of console programs.

    Along with it you have direct access also to two other streams System.out and System.err.

    System.in, System.out and System.err are initialized by the Java runtime when a Java VM starts.

提交回复
热议问题