add contents in java and ml