Implement the following method as a new static method for the IntNode class. (Us
ID: 3644895 • Letter: I
Question
Implement the following method as a new static method for the IntNode class. (Use the usual IntNode definition with instance variables called data and link.)public static boolean has42(IntNode head)
// Precondition: head is the head reference of a linked list.
// The list might be empty or it might be non-empty.
// Postcondition: The return value is true if the list has at least
// one occurrence of the number 42 in the data part of a node.