System.out & System.in are final static data member of System
class but we can change there reference through setOut() &
setIn() method how...
Answer Posted / rupakbhuyan
The System class provides the static methods setIn(),
setOut(), and setErr() for this purpose. The setIn() method
requires an argument of type InputStream that specifies the
new source of standard input. The other two methods expect
an argument of type PrintStream.
| Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
What is string builder?
How do you use substring in java?
What is the purpose of a volatile variable?
Explain the importance of finally over return statement?
What is the differences between c++ and java? Explain
What is default switch case? Give example.
How to compare strings in java?
What an i/o filter in java programming?
What are three ways in which a thread can enter the waiting state in java programming?
What is binary tree in java?
Explain java code for recursive solution's base case?
What is a platform?
What are wrapped classes in java programming?
How many bytes is a string?
What is wrapper class example?