We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › ArrayList question
Page Index Toggle Pages: 1
ArrayList question (Read 469 times)
ArrayList question
May 16th, 2007, 12:30am
 
In "regular Java," I can do this:
ArrayList<MyType> theList = new ArrayList<MyType>();
However, I just tried it in Processing, and I got a syntax error on the "<". Is it not possible to do this in Processing?

Edit: also tried it with a standard online example using <String>. Still didn't work.
Re: ArrayList question
Reply #1 - May 16th, 2007, 12:59am
 
The <type> syntax is java 1.5 or newer, Processing uses Java 1.4
Re: ArrayList question
Reply #2 - May 16th, 2007, 4:25am
 
Yeah, that'd do it. Thanks for your help!
Page Index Toggle Pages: 1