the fact is rescell.add(val) doesn't work. Can anyone help me out?

```
public class Solution {
public List<List<Integer>> levelOrder(TreeNode root){
int top=0;
List<List<Integer>> res=new ArrayList<>();
List<Integer> resCell=new ArrayList<Integer>();
List<TreeNode> TreeQ=new ArrayList<>();
List<TreeNode> TempQ=new ArrayList<>();
if(root==null) return res;
TreeQ.add(root);
while(true){
resCell.clear();
TempQ.clear();
while(!TreeQ.isEmpty()){
TreeNode topNode=TreeQ.get(top);
TreeQ.remove(top);
if(topNode.left!=null) TempQ.add(topNode.left);
if(topNode.right!=null) TempQ.add(topNode.right);
resCell.add(topNode.val);
}
res.add(resCell);
TreeQ=TempQ;
if(TreeQ.isEmpty())
break;
}
return res;
}
```

}

```
Input:
[1,2]
Output:
[[],[]]
Expected:
[[1],[2]]
```