Miscellaneous java programs