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 try-with-resources in java?
What do you mean by compiler?
What is a memory leak in java?
How does the java compiler work?
What is boolean flag in java?
Why java is said to be pass-by-value ?
What are strings in physics?
How do you use parseint in java?
What does microservices mean?
What is string args [] in java?
What is the difference between private & public & friendly classes?
Why do we need hashmap in java?
What is the purpose of sizeof operator?
How many tetrahedral voids are there in bcc?
Differences between external iteration and internal iteration?