The March of Progress by jgn on Wednesday, December 5, 2007 in Technology

From Cay Horstmann ( http://horstmann.com/)

1980: C

[source language='c'] printf("%10.2f", x); [/source]

1988: C++

[source language='c++'] ++cout 1996: Java

[source language='java'] java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance(); formatter.setMinimumFractionDigits(2); formatter.setMaximumFractionDigits(2); String s = formatter.format(x); for (int i = s.length(); i 2004: Java

[source language='java'] System.out.printf("%10.2f", x); [/source]

comments powered by Disqus