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
How many inner classes can a class have?
What is basic syntax?
What is the difference between && and & in java?
What is the concept of multithreading?
what is session in java?
What is void data type?
Can we declare a constructor as final?
What is the difference between serial and throughput garbage collector?
What is the relationship difference the canvas class and the graphics class?
How do you include a string in java?
What are the advantages of packages in java?
Can we create a class inside a class in java?
How do you check if two strings are equal in java?
What is passed by reference and pass by value ?
What environment variables are required to be set on a machine in order to run Java programs?