Re: newbie with object problems



leonardmatherson@xxxxxxxxxxx wrote:
Hello,

Here are my error messages from javac -

C:\j2sdk1.4.2_02\bin>javac xx.java
xx.java:125: <identifier> expected
      Vector<Object> king =new Vector<Object>();
            ^
xx.java:225: '(' or '[' expected
        ArrayList<Object> queen = new ArrayList<Object>();
                                               ^
2 errors

Without the <Object> it compiles fine - I am on dialup so do I really
have to get 142-08?

Thanks,

LM


Generics (eg. Vector<Object>) are a feature of 1.5.0 (aka java 5.0) and are not available in 1.4. So, yes, if you want those features you have to update (to 1.5).


--
Peter MacMillan
e-mail/msn: peter@xxxxxxxxxxxxx
.