Which of the following statements about generic programming is NOT correct? Gene
ID: 3819533 • Letter: W
Question
Which of the following statements about generic programming is NOT correct? Generic classes use type parameters to achieve genericity Generic programming can be achieved by using inheritance. Generic programming can be achieved by using type parameters To achieve genericity through inheritance, you must include type parameters to specify the type of object to be processed QUESTION 2 Which is the purpose of the E> element in the class declaration below? public class Thing E public Thing declares that only instances of E class can be stored O it is a type variable it is an instance variable it is a cast
Explanation / Answer
Question 1 : Option D is incorrect
i.e : to achieve genericity throughput inheritance , you must include type parameter to specify the type of object to processed.
Question 2 : Option A is correct
i.e : the purpose of <E> is to declare that only instances of E class can be store.
Question 3 : Option D is correct
i.e : Box is the specific type of generic box class.
Question 4 : Option A is correct
More than 4 question not allowed.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.