my Java attempts