osx - How do I input a text file directly into Java? -
this question has reply here:
reading in system.in - java [duplicate] 8 answersi heard this
java mymainclass < myinputfile.txt will provide file input java program.
but how access input?
that command piping file stdin, in java can access system.in.
for example, if want utilize scanner:
scanner input = new scanner(system.in); java osx terminal
No comments:
Post a Comment