w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
I'm going from learning C/C++ to learning Java: What the heck is this?

The default value of the variable ListNode next; is null, meaning it does not actually point to a ListNode Object until you assign one to the variable. So no - there is no infinite loop.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.