asked 62.2k views
2 votes
Analyze the operation method given below. What linked list operation does the method define?

boolean operation()
{
return (first.getNext() == null);
}

asked
User Jkerian
by
8.1k points

1 Answer

4 votes

Answer:

If the next of first is null then

TRUE.

else

FALSE.

Step-by-step explanation:

The return type of the method operation is boolean so it can only return True or False.

What we are checking inside the method is that the next of the first is null or not.

If the next of the first is null then the method will return true otherwise it will return false.

This is full analysis of the method operation.

answered
User PaulMest
by
8.0k points