Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8020501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:42:31+00:00 2026-06-04T21:42:31+00:00

I use a mass import class group as below: import java.awt.*; import java.awt.event.*; import

  • 0

I use a mass import class group as below:

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.io.*;
import java.text.*;
import java.util.regex.*;

This way I don’t have to worry about leaving any classes out.

Then when I used List I got this error:

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

How do I fix this? Is there a way to deport one of the classes? Which one is better?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:42:32+00:00Added an answer on June 4, 2026 at 9:42 pm

    You will need to refer to these types with their fully qualified names, java.util.List and java.awt.List, throughout this class file.

    This will disambiguate the two Lists so that it won’t strictly be necessary to “deport” anything (your import statements can stay the same). However I do agree with the other answer’s recommendations that you tidy up your imports.

    If one of the Lists was “deported” then that would let you refer to the other List by its short name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Use case: Wanna insert custom annotation to fields in java class generated by JAXB
I have mass of int, witch I use like this: final int[] iconN =
For sending mass emails I use single instance of MailMessage class and filling it
For use in a rigid body simulation, I want to compute the mass and
use this website a lot but first time posting. My program creates a number
Use case: I've just entered insert mode, and typed some text. Now I want
Use case: class MyTask(Task): queue = 'default_queue' def run(self): # do work Normally I
use Tk; my $mw=new MainWindow; $mw->geometry(1024x768); $mw->Scrolled(Text, -scrollbars => s, -width => 30,-height=>10)->pack( );
Many open source projects use a Configuration class and lambda's to clarify configuring a
I am working on generating emails using Java. I would love to use some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.