Question: Write the definition of the main method in the Driver class to declare two PointTypeNodes called firstNode and a currNode. Set both objects to null.
Write the definition of the main method in the Driver class to declare two PointTypeNodes called firstNode and a currNode. Set both objects to null. The program should prompt the user to enter two integer values. Set the firstNode object to be the two values entered by the user. Write java statements to insert four new nodes after the firstNode in the list. Use currNode to represent each new node that is created and inserted after the last inserted node in the list. Each node contains a pair of numbers entered by the user. Print all the values in the linked list to the console.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
