|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
"Ambiguous class: java.awt.List and java.util.List
private List ll; " The above error appear when i compile the java applet. I am not certain for the error and would like to know what the error is and how to correct this. Thanks!! |
|
#2
|
|||
|
|||
|
This just means that you have inported both java.awt.List and java.util.List and the compiler does not know which one you are trying to use when you specify "private List ..."
You are probably importing java.awt.* and java.util.* so you are getting both List classes from the two different packages. There are two ways of fixing this: One, import only the classes you need instead of the whole package. EG - import java.util.List; instead of import java.util.*; Two, specify the entire package name when you declare your List object. If you are really trying to use java.util.List and NOT java.awt.List try: "private java.util.List ..." instead of "private List ..." Hope that helps.
__________________
- MW |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > compiling error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|