2 Replies Latest reply: Jul 16, 2010 8:04 AM by 843789 RSS

    Create an String Array from a linked List

    843789
      I want to create an Array of names, from a linked list, can someone spot the error in my code because at the moment its returning null:
      public String[]createArray(){
                String []productName = null;
                ProductListNode node = head;
                for(int i = 0; i > Size(); i++){
                     productName= node.getData().getName();
                     node = node.getNext();
                }
                return productName;
           }