I cannot comment on previous comments, so I will post it here.
Because netbeans says no need to write
ArrayList< ArrayList< Integer>> v = new ArrayList< ArrayList< Integer>>();
because the arguments are redundant; instead you can write:
ArrayList< ArrayList< Integer>> v = new ArrayList<>();
source
share