import java.util.*;

public class Bucky {

    public static void main(String args[]) {
        String st[]={"1","2","3"};
        LinkedList<String> list = new LinkedList<String>(Arrays.asList(st));
        list.addFirst("5 first");
        st=list.toArray(new String[list.size()]);
        for(String x:st)
            System.out.printf("%s", x);


i wrote the same code but instead of a string array i used and int array . it gave me an error. Why?
and how can i use int instead of String

Something like this :-
LinkedList<int> list = new LinkedList<int>(Arrays.asList(intarray));


List<int> list = List<int>(Arrays.asList(intarray));