Formatter class Methods in Java

java.util.Formatter

An interpreter for printf-style format strings. This class provides support for layout justification and alignment, common formats for numeric, string, and date/time data, and locale-specific output.


Some methods of Formatter class.


close(): This method closes this formatted.


equals(Object): This method indicates whether some other object is "equal to" this one.


flush(): This method flushes this formatted.


format(String, Object...): This method writes a formatted string to this object's destination using the specified format string and arguments.


hashCode(): This method returns a hash code value for the object.


ioException(): This method returns the IOException last thrown by this formatter's Appendable.


locale(): This method returns the locale set by the construction of this formatted.


out(): This method returns the destination for the output.


toString(): This method returns the result of invoking toString() on the destination for the output.


No comments:

Post a Comment