开发者

Converting an arraylist to a normal array

I was wondering if a开发者_Go百科nyone would be able to show me how to convert an arraylist to normal array in Jsp?


yourArrayList.toArray()

but this won't be generic.. to use the generic version, let's assume you've got an ArrayList<Yourclass>. Just do:

YourClass[] array = yourArrayList.toArray(new YourClass[0]);

A side note: JSP is not a language but a container of Java code and html so what you need is Java code..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜