This is also a nice one:
String password = Integer.toString((int) (Math.random() * Integer.MAX_VALUE), 36);
It however does not guarantee that the password always contains both digits and letters, but most of the aforementioned suggestions also doesn't do that.