some examples of java codes