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
Can you make a constructor final in Java?
What is a parameter in matrices?
What does localhost mean?
What is a condition in programming?
How can u increase the heap size in the memory?
What is the arraylist in java?
What are the different types of collections in java?
How do you clear a method in java?
Difference between static and dynamic class loading.
What are the wrapped, classes?
what is the purpose of "virtual"?
State the difference between creating string as new () and literal.
What is the purpose of finalization in java programming?
What is difference between == equals () and compareto () method?
Why set is used in java?