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

//a program to understand how System.out.println works

class Temp{//here "class Temp{"=>"class System{"
static Demo d;//here "static Demo d"=>"static PrintStream out"
static{
d=new Demo();//here "d=new Demo()"=>"out=new PrintStream()"
}
}


class Demo{//here "class Demo{"=>"class PrintStream{"
void show(){//here "show(){"=>"println(){"
System.out.println("Hello");
}
}


class Xyz{
public static void main(String a[]){
Temp.d.show();
}
}

/*-------------------
OUTPUT
---------------------
Hello


*/

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the core java topics?

1104


What carriage return means?

1003


What does I ++ mean?

1117


What is hashset in java?

1191


What is remote method invocation (rmi)?

1110


What is the difference between break and continue statements?

1093


Is it possible to instantiate the abstract class?

1002


What data type is true or false?

1088


What are inbuilt functions?

1044


What is the buffer limit?

1077


What is a parameter in a function?

1035


What does += mean coding?

994


What is the difference between jvm and jre? What is an interface?

1147


Why does java have different data types for integers and floating-point values?

1062


What is the difference between a window and a frame in java programming?

1195