B 4.1.3 Worksheet 2 Java
Worksheet 2: SLL Insertion & Deletion (Java)Part 1: Code ImplementationContinue with your SinglyLinkedList and Node classes from Worksheet 1.Implement the insertAtBeginning(int newData) method in your SinglyLinkedList class.Implement an insertAfterValue(int prevData, int newData) method. This method should:Find the node containing prevData.If found, insert newData after it.If prevData is not found, print a message...