java codes mostly