java tutorial - How to convert ArrayList to String Array in java - java programming - learn java - java basics - java for beginners
Learn Java - Java tutorial - arrlist to strarray - Java examples - Java programs
ArrayList to String Array
- In this method toArray() that can convert the ArrayList of string type into the array of Strings.
- The toArray() method without passing any argument returns Object[].
- So you have to pass an array as an argument, which will be filled with the data from the list, and returned.
- You can pass an empty array also, but you can pass an array with the desired size.