Manuel Selva Manuel Selva - 5 months ago 83
Java Question

Best way to create singleton array

What is the "easiest" way for you to create a singleton (with exactly one element) Objects array in Java ?

Answer
Object [] singleton = { new SomeObject() };