Understanding Linked Lists in Java: A Comprehensive Guide