some examples in java