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
What is the collections api?
Is hashmap thread safe?
I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?
How do you ensure that n threads can access n resources without deadlock?
Explain scope or life time of local variables in java?
What is java virtual machine and how it is considered in context of java’s platform independent feature?
What is hashing principle in java?
What is the synonym of string?
What do you mean by checked exceptions?
What is tostring () method?
Can we change the scope of the overridden method in the subclass?
What does n mean in java?
What is the mapping mechanism used by java to identify IDL language?
What is string value?
What is super constructor?