Some useful stuff in java