Code example for Formatter

Methods: format

0
	} 
 
	@Override 
	public String toString() {
		StringBuilder sb = new StringBuilder();
		Formatter fmt = new Formatter(sb, Locale.US);
 
		fmt.format("Vector:\n", new Object[0]);
		fmt.format("  < %f %f %f >\n", new Object[] { Double.valueOf(this.x),
				Double.valueOf(this.y), Double.valueOf(this.z) });
		return sb.toString();
	} 
} 
Experience pair programming with AI  Get Codota for Java