Please provide a complete and functional Java code to solve this problem with comments.
Give an algorithm for finding the second-to-last node in a singly linked list in which the last node is indicated by a null next reference. ?
The response must be typed, single spaced, must be in times new roman font (size 12) and must follow the APA format.