Created
March 1, 2014 23:47
-
-
Save Nan-Zhang/9299497 to your computer and use it in GitHub Desktop.
The scope for static and local variables in Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TreeNode prev = null; | |
public void inorder(TreeNode root, ArrayList<TreeNode> t, TreeNode prev) { | |
//do sth with prev (Note: this prev is the local variable, and has nothing to do with the static prev) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment