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
What is the generic function?
Does list maintain insertion order java?
Write java program to reverse string without using api?
Which methods cannot be overridden in java?
What is a function in programming?
What is difference between pointer and reference?
What is polymorphism java example?
When can you say a graph to be a tree?
What is method overriding in java ?
What is a double?
What is the technique adopted to create an immutable class?
Should you use singleton pattern?
What are the Class Libraries ?
Is string is a class in java?
What language is pass by reference?