Solved

Given the Partial LinkedList Class Declaration Below, Select an Expression

Question 73

Multiple Choice

Given the partial LinkedList class declaration below, select an expression to complete the empty method, which is designed to return true if the list contains no elements. public class LinkedList
{
Class Node
{
Public Object data;
Public Node next;
}
Private Node first;
) . .
Public boolean empty()
{
Return ________________________ ;
}
}


A) first != null
B) first == null
C) first.data == null
D) first.next == null

Correct Answer:

verifed

Verified

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

Related Questions