Lower Bounded Wildcard Type QuizJ8 Home « Lower Bounded Wildcard Type Quiz

The questions in this quiz on Java are on the topics covered in the Generics section of the site. The table below lists the lesson used for each quiz, a description of the lesson content and the quiz number and questions associated with that lesson.

Lesson Summary

Click on a lesson in the table to go to that lesson for a refresher on the topics for that quiz.

Click on a quiz in the table to go straight to the quiz for a particular lesson.

Generics Lessons Description Quiz Info.
Lesson 1 - Generic BasicsIn our first lesson on on generics we unravel the terminology behind java generics and look at some of the strange syntax we get when using it.Quiz1
7 questions
Lesson 2 - Raw/Generic Type ComparisonIn this lesson we compare raw and generic types to see the advantages of using generics.Quiz2
6 questions
Lesson 3 - Generic InterfacesIn this lesson we look at generic interfaces and how to apply them in our Java code.Quiz3
6 questions
Lesson 4 - Generic ClassesThis lesson is about generic classes.Quiz4
6 questions
Lesson 5 - Bounded TypeIn this lesson on Java generics we investigate invariance and Bounded Type.Quiz5
7 questions
Lesson 6 - Unbounded Wildcard TypeIn this lesson we learn about generic Unbounded Wildcard Type.Quiz6
6 questions
Lesson 7 - Upper Bounded Wildcard TypesThis lesson on generics is about upper bounded wildcard types.Quiz7
6 questions
Lesson 8 - Lower Bounded Wildcard TypesThis lesson on generics is about bounded wildcard types.This quiz.
6 questions
Lesson 9 - Generic MethodsThis lesson is about generic methods.Quiz9
6 questions
Lesson 10 - Generic ConstructorsIn our final lesson on generics we look at generic constructors.Quiz10
7 questions

Generics Quiz 8

The quiz below tests your knowledge of the material learnt in Generics - Lesson 8 - Lower Bounded Wildcard Type.

Question 1 : The following code snippet is an example of a lower bounded wildcard type?
<? super Number>
- <code>? super Number</code> IS an example of a <i>lower bounded wildcard type</i>.
Question 2 : Is the following code snippet valid?
<? super Object>
- <code>? super Object</code> IS valid but would only allow the <i>Object</i> type and is not recommended when using a <i>lower bounded wildcard type</i>.
Question 3 : If we had a scenario where we only want a method to work on a particular class or superclasses of it which generic type would we use?
- If we had a scenario where we only want a method to work on a particular class or superclasses of it we would use the generic <i>lower bounded wildcard type</i> type.
Question 4 : Which reserved word is used with with a lower bounded wildcard type ?
- The <code>super</code> reserved word is used with with a <i>lower bounded wildcard type</i>.
Question 5 : Lower bounded wildcard type checks always allow for the Object type?
- Lower bounded wildcard type checks DO always allow for the <code>Object</code> type as it is the <i>superclass</i> of all objects.
Question 6 : The following code snippet is an example of a lower bounded wildcard type?
<? extends Number>
- <code>? extends Number</code> IS NOT an example of a <i>lower bounded wildcard type</i> but an <i>upper bounded wildcard type</i>.
Quiz Progress Bar Please select an answer

What's Next?

In the next quiz we test your knowledge of generic methods.