Question: Write the boolean method called isPresent below that accepts a String parameter called name and returns true if the String name is present in a
Write the boolean method called "isPresent" below that accepts a String parameter called "name" and
returns true if the String "name" is present in a linked list of NameNodes, and false if it is not present. If
the String parameter is empty or null, return false. Assume NameNode exists as shown below, and a
variable called "first" refers to the start of the linked list: pts
public boolean isPresent String namepublic String name;public NameNodeString name this.name name;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
