as we know that when we want to print anything on console
System.out.println is used
but i want to instantiate the system class such that i can write the code as
System.obj1.println("hello world")
is there any way to do that
i wrote a sample code but it is not working
Expand|Select|Wrap|Line Numbers
- class helloworld
- {
- System obj1=new System();
- System.obj1.println("hello world");
- }
The constructor System() is not visible
obj1 cannot be resolved or is not a field
please help, if there is any way to do that please tell me
thanks in advance
siddarth