Back to project page Smartlab.
The source code is released under:
Apache License
If you think the Android project Smartlab listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ir.smartlab.java.ch06.variablescope; /*www . j a va 2 s . com*/ /* * An example about variables' scope */ public class VariableScopeTest { int someInt; public void firstMethod() { int myNumber = 5; } public void someMethod() { myNumber = 10; // ? for (int i = 0; i < 10; i++) { // Do something } // Now what is i's value? System.out.println("i = " + i); int someInt; someInt = 5; // ? this.someInt = 7; // class variable } }