Why cant we define System.out.println() inside a class
directly?
Answer Posted / venkatachalapathy
we Directly write this line i.e System.out.println()
directly inside a class because println method is static
method in output stream class which are sub classes of
system class.
so every time this method is overridden in our program....
so static methods doesnt require a creation of object.....
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Is zero a positive integer?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?
Can we serialize static variables in java?
What is extension method in java?
What is a Hash Table? What are the advantages of using a hash table?
What is string data type?
Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.
Difference between throw and throws?
What is the formula to calculate percentage?
What is the main purpose of serialization in java?
Is null an object java?
What is a variable simple definition?
Is hashset sorted in java?
What is a memory leak in java?
What is meant by object oriented programming – oop?