Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / April 2005

Tip: Looking for answers? Try searching our database.

newbie with object problems

Thread view: 
leonardmatherson@hotmail.com - 27 Apr 2005 22:42 GMT
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
Peter MacMillan - 27 Apr 2005 22:44 GMT
> Hello,
>
[quoted text clipped - 15 lines]
>
> 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).

Signature

Peter MacMillan
e-mail/msn: peter@writeopen.com

Thomas G. Marshall - 28 Apr 2005 03:29 GMT
Peter MacMillan coughed up:
>> Hello,
>>
[quoted text clipped - 17 lines]
>
> Generics (eg. Vector<Object>) are a feature of 1.5.0 (aka java 5.0)

ICBW, but isn't it simply "java 5", with no revision?  I think it's one of
those marketing hoohah moments.  Very confusing from the get-go.  Like
having "Java 2" with jdk revs in the 1's.

> and are not available in 1.4. So, yes, if you want those features you
> have to update (to 1.5).

Signature

Everythinginlifeisrealative.Apingpongballseemssmalluntilsomeoneramsitupyournose.

Peter MacMillan - 28 Apr 2005 03:43 GMT
> Peter MacMillan coughed up:
>>Generics (eg. Vector<Object>) are a feature of 1.5.0 (aka java 5.0)
>
> ICBW, but isn't it simply "java 5", with no revision?  I think it's one of
> those marketing hoohah moments.  Very confusing from the get-go.  Like
> having "Java 2" with jdk revs in the 1's.

http://java.sun.com/j2se/1.5.0/docs/relnotes/version-5.0.html

"Both version numbers "1.5.0" and "5.0" are used to identify this
release of the Java 2 Platform Standard Edition. Version "5.0" is the
product version, while "1.5.0" is the developer version. The number
"5.0" is used to better reflect the level of maturity, stability,
scalability and security of the J2SE."

Of course, the -source parameter to javac accepts 1.5 and 5.

Signature

Peter MacMillan
e-mail/msn: peter@writeopen.com

Thomas G. Marshall - 28 Apr 2005 03:59 GMT
Peter MacMillan coughed up:
>> Peter MacMillan coughed up:
>>> Generics (eg. Vector<Object>) are a feature of 1.5.0 (aka java 5.0)
[quoted text clipped - 10 lines]
> "5.0" is used to better reflect the level of maturity, stability,
> scalability and security of the J2SE."

Thanks for the link.  Clears it up a tad.

> Of course, the -source parameter to javac accepts 1.5 and 5.

Signature

Forgetthesong,I'dratherhavethefrontallobotomy...

Tor Iver Wilhelmsen - 28 Apr 2005 07:32 GMT
> "Both version numbers "1.5.0" and "5.0" are used to identify this
> release of the Java 2 Platform Standard Edition. Version "5.0" is the
> product version, while "1.5.0" is the developer version. The number
> "5.0" is used to better reflect the level of maturity, stability,
> scalability and security of the J2SE."

The really funny bit is if they do a "Solaris" next, and use 5.1 for
1.6.0.
Aleksandar Pecanov - 28 Apr 2005 00:03 GMT
Yes. The <Object> indicates the use of generics availible only in 1.5 or
higher.

> Hello,
>
[quoted text clipped - 15 lines]
>
> LM


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.