Question: Java question 1. pubilc class IntNode private int data; private IntNode link public IntNode(int data, IntNode link) this.data- data; this.link link; public int getData) return
1. pubilc class IntNode private int data; private IntNode link public IntNode(int data, IntNode link) this.data- data; this.link link; public int getData) return data; public IntNode getLink return link; public void setData(int data) this.data data; public void setLink(IntNode link) this.link- link; ItNode (a) write statements to create an empty list create a list that has a single node insert an element to the front of the list insert an element to the end of the list insert an element to the middle of the list remove the first of the list remove an element in the middle from the list remove the last element from the list b. Write an implementation of the static method public static int countZeros(IntNode node) that will count the number of zeros that occur in the given linked list of ints. (b) Write a method that insert a new node at the end to the list referred by head public static void list Taillnsert(IntNode head, int entry) (c) Write a method public static void set(int element, int i, IntNode head ) that modifies the list referred to by the parameter head so that the i'th node in the list has its data changed to element. If there is no i'th node in the list, then the list is not modified
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
