Convert Object Into Array Using Java