I have been stuck with a problem that was asked recently at an interview. The problem was stated as:
Suppose you don’t have access to System class in Jdk API. You cannot
use ECHO also. You are in JRE 5 environment. How will you print
anything on the console?
The question really started with — Why has Java given us the PrintStream object System.out? And why is it final? Isn’t there any other way to print anything on console?
You could bypass the System object if you want to. System.out does a lot of extra stuff (handling unicode, for instance), so if you really want just the raw output and performance, you actually probably even should bypass it.
This has been elaborated a bit further in here.