What is the "easiest" way for you to create a singleton (with exactly one element) Objects array in Java ?
What is the "easiest" way for you to create a singleton (with exactly one element) Objects array in Java ?
Arrays in Java are mutable.
But if you want to create a single object in an array, you can do like this:
Object[] objArray = new Object[] { put your object here };