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
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 |
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 |
What is the use of collections in java? How it is implemented in real time applications?
What is the difference between access specifiers and access modifiers in java? 16
When is the finalize() called? What is the purpose of finalization?
What is the difference between integer parseint and integer valueof?
How can I right-justify a string?
Can we override constructors?
How transient variable is different from volatile variable?
What classes of exceptions, thrown by a throw statement?
What is a string token?
What is the importance of hashcode() and equals() methods?
How many bytes is double?
What is the difference between error and an exception?