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 is the purpose of stub and skeleton?

0 Answers  


Can we clone singleton object?

0 Answers  


Which collection does not allow duplicates in java?

0 Answers  


What is meant by constructor?

8 Answers  


Write a program to reverse a number in java?

0 Answers  






What value is a variable of the string type automatically initialized?

0 Answers  


Why is logger singleton?

0 Answers  


Can static methods be inherited?

0 Answers  


what is the use of thread?Justify it by project point of view

7 Answers  


What is meant by overloading?

0 Answers  


What is difference between calling start() and run() method of thread?

0 Answers  


What is the ==?

0 Answers  


Categories