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

explain System.out.println()

Answer Posted / surya simhadri

System is a predefined class in lang package and out is a
static member with in a System class and also out is an
instance of PrintStream which is a static inner class of
System class and finally print() and println() are member
functions of PrintStream class. So we can call those
methods using out and out is called with class name in
which it is declared( bcoz it is static member variable of
system class). So finally we can call println as
System.out.println().
EX:
class System {
static public PrintStream out;
public static class PrintStream {
public string print(String s) {

}
public string println(String s) {

}
public static void main(String[] arg) {
System.out=new PrintStream();
System.out.println("");
}

}
}

Is This Answer Correct ?    20 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the rules for variable declaration?

914


Can a method be overloaded based on different return type but same argument type?

914


Can we make constructors static?

1182


What is the meaning of I ++ in java?

1114


How does system arraycopy work in java?

1062


Does the order of public and static declaration matter in main method?

1041


How are this() and super() used with constructors in java programming?

1025


How is Object Oriented Programming different from Procedure Oriented Programming?

998


why java uses class level type casting ?

2617


How to declare objects of a class ?

1024


Can a static member function access member variable of an object?

964


Why hashcode is used in java?

925


What is a void method?

886


How do you detect memory leaks?

1014


What is the disadvantage of java?

905