some java codes