Update Util.java

Added a list to array function