Some java code that i wrote to study