Add new contents and modify java arrays.