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
How many types of parsers are there?
Which is better ascii or unicode?
What super () does in java?
Why does java not support operator overloading?
How does a for loop work java?
How to perform merge sort in java?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?
Explain inheritance in java?
What is constructor chaining and how is it achieved in java?
What is private static in java?
What is the difference between C++ and Java and your preferences?
Write a program to print 15 random numbers using foreach of java 8?
How many types of memory areas are allocated by JVM in java?
How do I enable java in safari?
What is array list in java?