Java Program To Convert List To Array In Scala