Click to See Complete Forum and Search --> : Help Needed : Ambigious class


September 30th, 1999, 03:46 PM
I have the following imports on my java file.
import java.awt.*;
import java.util.*;
private List list;

When I try to compile, I'm getting a ambigious class definition for list error.
How do I solve the problem ? I need to use both the java.util and java.awt.

meherss
September 30th, 1999, 04:10 PM
Reason is List is there in AWT and as well as java.util.*

Write like this

import java.awt.*;
import java.util.*;

private java.awt.List myList;






Meher

poochi
September 30th, 1999, 04:15 PM
Yes there are two list class in java ( in awt & util ). Which List class you want. If you
like to create an instance of java.awt.List class , try like this ..



private java.awt.List list = new java.awt.List();





This will solve your problem..

poochi...