I wrote this code on jcreator using a recursive method and when i compiled it , it gave me this error: <identifier> expected even though i identified the two lists in the main method and i dont know what is the problem with it , could you please tell me what is the problem with my program?!!
thank you!!
So, this is my program ( i used Jcreator to compile it!)
this is the task that i hopefully did below in my program im supposed to : Write a recursive method that takes two sorted lists in increasing order.The method creates
and returns a new list representing the union of the two lists.The resulting list should be
sorted.
The method should traverse the lists only once.
The method should be implemented using isEmpty(), insertFirst(), insertLast(), deleteFirst(),
deleteLast(), getFirst(), getLast().
Do not use refrence manupilation. Implement it recursively.
Example:
list1 contains{1,2,4}, list2 contains {2,3,4,5} the output list should look like {1,2,3,4,5}.