System.out & System.in are final static data member of System
class but we can change there reference through setOut() &
setIn() method how...

Answers were Sorted based on User's Feedback



System.out & System.in are final static data member of System class but we can change there re..

Answer / 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

System.out & System.in are final static data member of System class but we can change there re..

Answer / vikas

but the Final method have there behavior to not get change but it get change through setIN() & setOut() methods how...
i know it is used to change its reference but why it get change if it is a final method...

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

What modifiers may be used with a top-level class?

0 Answers  


How do you sort a list in java?

0 Answers  


What is the use of Getters and Setters method ?

4 Answers  


System.out.println("somestring"); It will create any object or not

5 Answers   CSC,


What is the driver class?

0 Answers  






How objects of a class are created if no constructor is defined in the class?

0 Answers  


Tell us something about an iterator.

0 Answers  


Explain the difference between hashmap and hashtable in java?

0 Answers  


How do I write a self declaration?

0 Answers  


What is the use of math abs in java?

0 Answers  


Name the method that used to clear the buffer ?

2 Answers  


What is private static in java?

0 Answers  


Categories