insert new_node between temp and next .
temp . next = new_node ; new_node . prev = temp ; new_node . next = next ; next . prev = new_node ; } static void display ( ) { Node temp = start ; System . out . printf ( " Traversal in forward direction "); while ( temp . next != start ) { System . out . printf ( " % d ▁ " , temp . data ) ; temp = temp . next ; } System . out . printf ( " % d ▁ " , temp . data ) ; System . out . printf ( " Traversal in reverse direction "); Node last = start . prev ; temp = last ; while ( temp . prev != last ) { System . out . printf ( " % d ▁ " , temp . data ) ; temp = temp . prev ; } System . out . printf ( " % d ▁ " , temp . data ) ; }