Why cant we define System.out.println() inside a class
directly?
Answer Posted / chandan
because a class is a logical structure and its definition is
group of entities but when we need some functionality we
need to define inside the function
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is class and object in java?
Is null a string?
What is null statement?
How to overcome the exception object reference not set to an instance of object?
Why packages are used?
Why to use nested classes in java? (Or) what is the purpose of nested class in java?
What is variable in java?
What is http client in java?
Explain the purpose of garbage collection in Java?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
What is the difference between assignment and initialization?
how to write a program for sending mails between client and server
Explain some best practices you would apply while using collection in java?
What is java oops?
Can inner class have constructor?