Java Formatter.ioException()
Syntax
Formatter.ioException() has the following syntax.
public IOException ioException()
Example
In the following code shows how to use Formatter.ioException() method.
//from www . ja va 2s . co m
import java.util.Formatter;
import java.util.Locale;
public class Main {
public static void main(String[] args) {
StringBuffer buffer = new StringBuffer();
Formatter formatter = new Formatter(buffer, Locale.US);
String name = "from java2s.com";
formatter.format("Hello %s !", name);
System.out.println(formatter.ioException());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »