Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the symbol for an unbounded wildcard in Java?
Think of a placeholder for any type.
Which operation is not allowed with unbounded wildcards?
Remember, since the type is unknown, you cannot add.
What does <?> represent in Java?
Think of it as a placeholder.
Can you add elements to a collection of type List<?>?
Consider what you can and cannot do with unknown types.
Write a Java method that accepts a List<?> and counts the number of elements. Provide your reasoning.
Think about iterating through the list.
Propose a scenario in application development where unbounded wildcards are particularly useful, explaining your reasoning.
Consider how libraries handle various data types.
4 more questions in this section. Enroll free to practise them all.
Enroll free