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

Here System is a class available in java default package
java.lang.. It contains fields and methods that support
standard input n output facilities.System class has Final
modifier so it cant be inherited..
out is a static field in System class of PrintStream
type(printstream is a built in class contains methods to
print different data tyes)
println is the method of the printstream class to print
different values..
Example:
class System
{
static PrintStream out;
'
'
'
'
}
class PrintStream
{
void println();
void print();
'
'
'
}

System.out.println() means
System is a class and out is a static field so we acces it
by using class name..
so System.out
and println is a method of PrintStream..so non static
methods should access using reference or object and out is
the reference(holds the adress of PrintStream object) of
PrintStream so we access it using out..
so System.out.println()..

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to check string is palindrome without using loop?

1087


What are different access specifiers in java? Explain

1178


What is difference between protected and private?

1141


Can we override the overloaded method?

1193


What is the use of parseint in java?

1080


Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?

1028


What is return code?

1057


Why does it take so much time to access an applet having swing components the first time?

1983


Can a vector contain heterogenous objects?

1112


When do we use synchronized blocks and advantages of using synchronized blocks?

1278


Which class contains a method: cloneable or object?

1093


What is the difference between instanceof and isinstance?

1126


What is the difference between the boolean & operator and the && operator in java programming?

1094


What is difference between fail-fast and fail-safe?

1283


Is nan false?

1039