import java.util.*; class Foo { { List l; String[] s = l.toArray(new String[0]) } }