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

any other way to print the text without using
System.out.println() in java?

Answer Posted / srinivas

Using PrintWriter class-

PrintWriter writer = new PrintWriter(System.out);
writer.println("Method 2");



PrintWriter makes the output internationalizable - because encodings like UTF-8 can be specified.

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the main advantage of passing argument by reference?

960


What is the instance of an object?

1183


Explain the difference between runnable and callable interface in java?

1040


What is difference between calling start() and run() method of thread?

1122


What are recursive functions?

1048


What is a method vs function?

1029


Is arraylist ordered?

1060


What exactly is java?

937


what is the difference between the methods sleep() and wait()? : Java thread

954


Write a program to find the whether a number is an Armstrong number or not?

1018


What is a qms manual?

994


Can a static method be overridden in java?

1008


Is constructor inherited?

955


Write a java program to check if a number is prime or not?

1032


How do singleton patterns work?

961