Also, the ListNodes you're passing as parameters should have their data types. I think that you said they were both Integer.
public static ListNode<Integer> insertBeforeSmallest...
Type: Posts; User: javapenguin
Also, the ListNodes you're passing as parameters should have their data types. I think that you said they were both Integer.
public static ListNode<Integer> insertBeforeSmallest...
(String)prevNodeMain.getValue ()
If you're using Integers,
prevNodeMain.getValue().toString() would be better.
I don't think the way you have it now will work.
int length = Length (prevNodeMain);
I don't see what this is for.
Usually you look at the size of the entire list, not a just a single Node.
Unless Length is another method in the class that...
ListNode<Integer> start as your ListNode stores Integers.