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

Why java is a platform independent? Explain

0 Answers  


Is delete, next, main, exit or null keyword in java?

1 Answers  


What is the difference between variable & constant?

0 Answers  


What is the need of "creating and throwing an UserdefinedException" when the "Exception" class is already available?

4 Answers  


What is "finally" keyword?

10 Answers  


Is a class an object?

0 Answers  


os is developed in c no java is more secured then c na why dont the os developed is developed using java

1 Answers  


Which method will get invoked first in a stand alone application?

1 Answers  


What is the life-cycle of an object?

2 Answers   Broadridge, Syntel,


what is a green thread? : Java thread

0 Answers  


How many digits can a float hold?

0 Answers  


How to Sort list of Strings in ascending order without using java api.

1 Answers   HCL, NIIT,


Categories