Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / madhu

we can override only class methods and we can't override the
output Stream methods.

Is This Answer Correct ?    2 Yes 2 No

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

Answer / shahid

because println method is not abstract method it is method
of output stream class so we cant override.and it is just
overloded method.

Is This Answer Correct ?    3 Yes 3 No

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

Answer / 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

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

Answer / 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

More Core Java Interview Questions

What is the mapping mechanism used by java to identify IDL language?

0 Answers  


what is an virtual function

2 Answers   TCS,


what do you mean by classloader?

0 Answers  


Why local variables are stored in stack?

0 Answers  


What is abstraction in java?

0 Answers   Akamai Technologies,


is there any function in java to make the text to blink?

6 Answers  


What are the limitations for static method?

3 Answers   Greenwood,


List some oops concepts in java?

0 Answers  


What is double data type?

0 Answers  


how to use this key word in java programming?

7 Answers  


Is main an identifier?

0 Answers  


What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

0 Answers  


Categories