some java code for study