SingleLink.java not working but idea is good

a java program for school