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


Please Help Members By Posting Answers For Below Questions

What are actual parameters?

718


What is class forname used for?

770


Compare java and python.

753


What do you mean by exception handling in Java?

968


How to sort array of 0 and 1 in java?

728


What is static and final keyword in java?

765


Difference between string, stringbuffer and stringbuilder?

793


What is java full form?

713


What is parsing a string?

817


How many ways can we create singleton class?

711


Is 9 a prime number?

642


Can static method access instance variables ?

810


How do you create a first line indent?

713


Is array a class in java?

705


What is the difference between a synchronized method and a synchronized block?

834