| Author |
having trouble understanding generics
|
Randall Twede
Ranch Hand
Joined: Oct 21, 2000
Posts: 4089
|
|
i tried changing
to
but still getting warnings
|
SCJP
|
 |
Stephan van Hulst
Bartender
Joined: Sep 20, 2010
Posts: 3044
|
|
|
Hi Randall. Please post the warnings you get.
|
 |
Randall Twede
Ranch Hand
Joined: Oct 21, 2000
Posts: 4089
|
|
found raw type: JComboBox
private JComboBox<String> = new JComboBox(choices);
missing type argument for generic class JComboBox<E>
unchecked call to JComboBox(E[])
unchecked conversion
private JComboBox<String> = new JComboBox(choices);
required JComboBox<String>
found JComboBox
3 warnings
|
 |
Jeff Verdegan
Bartender
Joined: Jan 03, 2004
Posts: 5780
|
|
Oh, you already tried that?
What warnings did you get for that code?
|
 |
Randall Twede
Ranch Hand
Joined: Oct 21, 2000
Posts: 4089
|
|
i still don't get it
the warnings are for the second code. i think the warnings for the original code were similar
|
 |
Stephan van Hulst
Bartender
Joined: Sep 20, 2010
Posts: 3044
|
|
|
Try to clean the project and then recompile it. NetBeans has a 'Clean and Build' option under the 'Run' menu.
|
 |
Randall Twede
Ranch Hand
Joined: Oct 21, 2000
Posts: 4089
|
|
|
i think i know what you mean. since i am using Command Prompt i will delete all class files and recompile
|
 |
Randall Twede
Ranch Hand
Joined: Oct 21, 2000
Posts: 4089
|
|
|
that did it. thanks
|
 |
Jeff Verdegan
Bartender
Joined: Jan 03, 2004
Posts: 5780
|
|
Randall Twede wrote:i think i know what you mean. since i am using Command Prompt i will delete all class files and recompile
Good call. And then, SSCCE, complete with copy/paste of exact error message, or it didn't happen.
|
 |
 |
|
|
subject: having trouble understanding generics
|
|
|