CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Help Needed : Ambigious class

    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.



  2. #2
    Join Date
    Jun 1999
    Location
    Atlanta, GA
    Posts
    57

    Re: Help Needed : Ambigious class

    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

  3. #3
    Join Date
    Sep 1999
    Location
    Madurai , TamilNadu , INDIA
    Posts
    1,024

    Re: Help Needed : Ambigious class


    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...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured