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

explain the concept of virtual method invocation in polymorphism in detail?

0 Answers   TCS,


Is set ordered in java?

0 Answers  


What is compile time polymorphism?

20 Answers   CTS, Elementus Technologies, Oracle,


What does a za z0 9 mean?

0 Answers  


What is substring 1 in java?

0 Answers  


Can size_t be negative?

0 Answers  


Which is bigger double or float?

0 Answers  


Accenture NJ mostly ask question on Collection like 1)How to sort Objcts and how treeset sort them 2)Explain mechanism of Hashcode finding in Java 3)Name some of the Sorted collection.

2 Answers   Accenture,


What is the size of an array?

0 Answers  


explain Anonynous inner class?

6 Answers   TCS,


What are heap memory and stack memory and what are memory tables.

0 Answers   Aspiring Minds,


Why doesn't the java library use a randomized version of quicksort?

0 Answers  


Categories