[Solved] Add and retrieve elements with Numbers array in Java December 31, 2022 by Kirat Use a List (e.g. ArrayList) instead. And before passing it to the Graph API convert it back to Numbers[] array with toArray(). There’s also an example how to loop over the list in the toArray link. solved Add and retrieve elements with Numbers array in Java