//fetcing the nth node from the end public class Endnode { Node head; static class Node { Node next; int data; Node(int d) { data=d; next=null; } } //function to fetch the nth node public void noden(int n) { int len=0; Node temp=head; //counting number of nodes in the linked list while(temp!=null) { temp=temp.next; len++; } if(len