Basic java codes