Answer Posted / mohneesh
printf in Java works exactly as in C.
it automatically formats your string, which is not possible
in println directly.
System.out.printf("%s\n\t%s","Mohneesh","Wadhwani");
Output:
Mohneesh
Wadhwani
where as you can use String Formatter to format String then
pass it to println to print.
| Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
What is matcher in java?
What is the buffer limit?
When is the finalize() called?
Why array is used in java?
What are the types of sockets in java?
Explain the concept of proper inheritance?
How do you create a bulleted list?
What is fail fast in java?
What is independent and dependent variables in research?
Why parsing is done?
Write a program to check string is palindrome without using loop?
What is void data type?
Explain tree set and its features?
What is __ init __ functions?
Is java a pure object oriented language?