Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Binder Early Objects
Quiz 18: Generic Classes
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 21
Multiple Choice
Consider the following code snippet that declares the GraduateStudent class: public GraduateStudent extends Student { . . .} Which of these statements are false? I GraduateStudent is a subclass of Student II Stack<GraduateStudent> is a subclass of Stack<Student> III Stack<Student> is a subclass of Stack<GraduateStudent>
Question 22
Multiple Choice
Which of the following statements about generic methods is correct?
Question 23
Multiple Choice
Consider the following code snippet: public static <E> void print(E []A) { For (int i = 0; i < a.length; i++) { System.out.println(a[i] + " ") ; } } Int[] a = {3,6,5,7,8,9,2,3}; String[] s = {"happy","cat","silly","dog"}; Boolean[] b = {"true", "true", "false"}; Which of the following are correct calls to this generic print method? I print(a) ; II print(s) ; III print(b) ;
Question 24
Multiple Choice
Determine the correctness of the MyLinkedList generic class code below. public class MyLinkedList<E> { Private MyNode first; Public E getFirst() { return first.data; } Private class MyNode { Private E data; Private MyNode next; } }