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 a numeric string?
What is the driver class?
Can we write multiple catch blocks under single try block?
What is a substring of a string?
What access modifiers can be used for methods?
What do you understand by an io stream?
Can a class have 2 constructors?
Does java map allow duplicates?
What is arraylist class in java?
Why we do exception handling in java and how many types of exceptions are there?
What are singleton services?
Why call by value prevents parameter value change?
What are the different collection views provided by maps?
What is difference between module and function?
What is linked hashmap and its features?