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


Please Help Members By Posting Answers For Below Questions

What are the string methods in java?

578


What is the difference between serial and throughput garbage collector?

573


How to obtain a performance profile of java program

540


What does a za z0 9 mean?

560


What is update method called?

655






Can a constructor be made final?

656


What is broken and continue statement?

526


What is the difference between quicksort & mergesort? When should they be used? What is their running time?

648


define the terminology association.

608


What will happen if static modifier is removed from the signature of the main method?

521


What is double word?

530


What is generic class?

641


What are the basic control structures?

492


2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?

1827


What is a Transient Object?

627