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...


how system.out.println() works?

Answers were Sorted based on User's Feedback



how system.out.println() works?..

Answer / subbu

//the System class belongs to java.lang package
class System {
public static final PrintStream out;
//...
}

//the Prinstream class belongs to java.io package
class PrintStream{
public void println();
//...
}

java.lang package is default package hence no need to import
additionaly to use System class

System is having static reference of PrintStream class whihc
has println() method.

So we can directly acces the println() using out referece.

System.out.println();

Is This Answer Correct ?    16 Yes 0 No

how system.out.println() works?..

Answer / manish

In system.out.println()
'System' is a class which is having reference variable 'out' of type printStream class, and PrintStream class having overlaodded methed 'println()' for different purposes..

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are the different types of inheritance in java?

0 Answers  


How do you use compareto?

0 Answers  


What is the functionality of Webserver?

2 Answers  


Difference between ‘is-a’ and ‘has-a’ relationship in java?

0 Answers  


Why const and goto are reserved keyword in java?

1 Answers  


Explain oops concepts in detail?

0 Answers  


What is n in java?

0 Answers  


What is the difference between constructor and method?

4 Answers  


What is the difference between an interface and an abstract class?

0 Answers   Cyient,


What is variable argument in java?

0 Answers  


How many inner classes can a class have?

0 Answers  


What are other modifiers?

2 Answers   Wipro,


Categories