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 array list in java?

0 Answers  


Can we sort list in java?

0 Answers  


What is the use of collections in java? How it is implemented in real time applications?

2 Answers  


explain the collection in java

1 Answers   WDC,


What is a class instance variable?

0 Answers   Tech Mahindra,






Is void a keyword in java?

0 Answers  


Suppose i have two threads t1 and t2 are running.How the main thread will know that the two threads t1,t2 execution has completed?

2 Answers   Subex,


what is use of business objects?

3 Answers   Tech Mahindra,


What is the destroy method?

0 Answers  


Can an anonymous class be declared as implementing an interface and extending a class?

2 Answers  


What is keyword in oop?

0 Answers  


how does multithreading take place on a computer with a single cpu? : Java thread

0 Answers  


Categories