If current node data is greater for max then replace it
if ( current . data > max ) { max = current . data ; } current = current . next ; } System . out . println ( " Minimum = " ▁ + ▁ min ▁ + ▁ " , Maximum = " + max); }