Solved

Determine the Correctness of the MyLinkedList Generic Class Code Below

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;
}
}


A) MyNode cannot refer to type variable E
B) first.data will cause a compiler error
C) the inner class MyNode cannot be private
D) the code is correct

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents