Why cant we define System.out.println() inside a class
directly?

Answer Posted / madhu

We can't because The method signature matters when you are
declaring the method. we can't give a name with
System.out.println, but we can define println()

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you use this() and super() both in a constructor?

525


What will be the initial value of an object reference which is defined as an instance variable?

647


Define max and min heap, also the search time of heap.

599


Write a java program to count the number of words present in a string?

540


Can we define static methods inside interface?

531






What kind of variables can a class consist?

595


Is an integer an object?

521


Explain the difference between an object-oriented programming language and object-based programming language?

551


Which non-unicode letter characters may be used as the first character of an identifier?

603


What is the name of the java compiler?

529


Can an interface implement another interface?

580


What is the driver class?

569


What is adapter in java?

521


explain multi-threading in java?

562


Why is method overloading not possible by changing the return type in java?

597