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 main advantage of passing argument by reference?
What is the instance of an object?
Explain the difference between runnable and callable interface in java?
What is difference between calling start() and run() method of thread?
What are recursive functions?
What is a method vs function?
Is arraylist ordered?
What exactly is java?
what is the difference between the methods sleep() and wait()? : Java thread
Write a program to find the whether a number is an Armstrong number or not?
What is a qms manual?
Can a static method be overridden in java?
Is constructor inherited?
Write a java program to check if a number is prime or not?
How do singleton patterns work?