I am not sure what is your problem, but I see a number of issues with your code:
rrrr wrote on Feb 27th, 2009, 9:08pm:[1] int a=2;
String[] feedurl={};
FeedReader[] feed=new FeedReader[a];
[2] feed=new FeedReader[feedurl];
[3] println("Feed: "+feed[a].title);
[4] java.util.List entrl=feed.getEntries();
Object [] o=entrl.toArray();
numEntries=o.length;
[1] Minor issue here, but you can use feedurl.length to initialize the size of feed.
BTW, there is a quite well established convention to put a plural to array names: feedURLs, feeds, etc.
[2] This line is confusing. Syntax is wrong (need an integer, perhaps .length as shown). And you are overwritting the initial assignment.
The
new T[n] syntax is to create arrays of type T with n entries. It returns T[] type. The
new T(p1, p2) syntax is to create an object of type T by giving parameters p1, p2 to class T's constructor.
[3] a is 2, length of feed is 2, ie. with indexes 0 and 1: you will get an ArrayOutOfBounds exception.
[4] You don't need a toArray to get the size of a List!
numEntries = entrl.size(); should do the work.
HTH.