Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

reference to class List is ambiguous

843807Apr 7 2006 — edited Apr 8 2006
Hello,

I've started to make my first java program in which I use AWT.

When I compile the file, it gave me this error:

"reference to List is ambiguous, both class java.awt.List in java.awt and class java.util.List in java.util match"

So I use some tools from the java library: java.util ( f.e. arrays)
and I use of course the library: java.awt

Now when I try to make a list:
f.e.

List data = new List(10,false);

The program doesn't know if I want to use the method List, from AWT or UTIL
In fact, I want to use this from AWT.

How can I make that clear.

Thx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 6 2006
Added on Apr 7 2006
3 comments
1,471 views