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?

Answers were Sorted based on User's Feedback



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

Answer / sathish

System.out.write("text".getBytes());

System.out.format("%s", "text");

Is This Answer Correct ?    20 Yes 1 No

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

Answer / chitu

system.err prints the error, return statements with overrididing the toString method can print the statments
void toString()
{
return cn print this ;
}

Is This Answer Correct ?    9 Yes 10 No

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

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

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

Answer / hemanth

Yes of course. U can print text without using s.o.p by using static initialization block in Java

Is This Answer Correct ?    5 Yes 12 No

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

Answer / ravi ranjan

int a=10;

System.out.printf("%d",+a);

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More Core Java Interview Questions

What does null mean in java?

0 Answers  


Can a set contain duplicates?

0 Answers  


What is a nullable field?

0 Answers  


what is the life cycle of jsp?

3 Answers   Photon,


What is the final keyword denotes?

0 Answers  


Is static variable stored in heap?

0 Answers  


What flag up means?

0 Answers  


Is int a class in java?

0 Answers  


What is the purpose of the wait(), notify(), and notifyall() methods in java programming?

0 Answers  


Why can't we make jsp as a controller and action servlet in struts?

8 Answers   TCS, Wipro,


What is the purpose of main function in java?

0 Answers  


What are recursive functions?

0 Answers  


Categories