I’m coding some Java this days due to academic reasons: mostly J2EE web stuff using the now ubiquitous MVC pattern using servlets, JSP, JSLT and JSF. Unless you are a bit of a clueless programer it should be no news to you that Java development is a little bit bloated and no, even if some people like to think that way, Java is NOT the language Bjarne Stroustrup would have designed if he hasn’t had to remain compatible with C as he clarifies in the FAQ of his website. So you shouldn’t be that surprised after all when reading how Cay Horstmann, a computer science professor at the San Jose State University, has summed up the evolution of Java from C and C++:
- 1980: C
- printf(”%10.2f”, x);
- 1988: C++
- cout << setw(10) << setprecision(2) << showpoint << x;
- 1996: 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 < 10; i++) System.out.print(' '); -
System.out.print(s);
- 2004: Java
-
System.out.printf("%10.2f", x); - Don’t know you but I really found it funny




















Recent Comments