Examples in java