Answers for "Android java toArray to String array"

0

Android java toArray to String array

List<String> stockList = new ArrayList<String>();
stockList.add("stock1");
stockList.add("stock2");

String[] stockArr = new String[stockList.size()];
stockArr = stockList.toArray(stockArr);

for(String s : stockArr)
    System.out.println(s);
Posted by: Guest on June-25-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language