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 defines function?
What is data structure in java?
What is string in java? String is a data type?
What is Session reduplication and how its done?
Explain method overloading?
What is a stack class in java ?
What is the escape character in java?
What is a boolean field?
How can you handle java exceptions?
What does compareto () do in java?
why Interface used?
What are the 3 types of loops in java?
Can java arraylist hold different types?
What is the final keyword denotes?
why we use merge option in hybernate pls give a ex snippet