Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm just curious what does this do
Java
<?>


in this code?
Java
node instanceof ComboBox<?>


I tried replacing it with
Java
node instanceof ComboBox<String>
but eclipse warns me that
Java
Type Node cannot be safely cast to ComboBox<String>


What I have tried:

I tried to search this already but found no answer or maybe I'm just searching the wrong keywords. Anyway, big thanks for any future clarifications and help.
Posted
Updated 1-May-22 19:37pm

1 solution

It's called an Unbounded Wildcard[^]
 
Share this answer
 
Comments
CPallini 2-May-22 2:42am    
5.
lelouch_vi 2 2-May-22 8:59am    
what is 5.?
CPallini 2-May-22 9:30am    
I gave him 5 stars.
You are free to give him 5 stars as well.
lelouch_vi 2 2-May-22 21:24pm    
@CPalini oh okay. I just thought that you were referring to a line number or anything within the link given by OriginalGriff. Silly me anyway yeah 5 stars for this.
OriginalGriff 2-May-22 9:31am    
If you look at where it says "Solution 1" above, you will see five stars on the right hand side. These are a "voting system" where 1 star means "bad answer" and 5 stars means "excellent answer".
Carlo was just saying "well done!" to me for the answer I gave you, is all.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900