use of contain in java