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 four corner stones of oop?

550


How many times finalize method will be invoked? Who invokes finalize() method in java?

578


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

573


Why you should not use singleton?

546


How many types of string data types are there?

561






What is listnode in java?

537


How many threads can java run?

563


Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?

609


How big is a boolean?

583


Are arrays static in java?

590


What is an image buffer?

543


Can we compare two strings in java?

564


What are the differences between stringbuffer and stringbuilder?

545


How do I run java on windows?

533


What is array size in java?

502