class B523{ // private int k = 10; public void go(int x, final int y){ // int a = x+y; final int b = x-y; class InB{//局部类 public void foo(){ System.out.println(b); } }//InB InB here = new InB(); here.foo(); }//go } public class A523 { public static v
出处:http://www.cnblogs.com/BetterWF/archive/2012/07/03/2574416.html 今天在开发接口时候,需要给接口开发公司提供一个ORACLE 用户,只能访问指定的表或视图,把过程记录到此 1.创建一个ORACLE 的用户 create user username identified by pws; 2.给用户授权 grant connect,resource to username; grant select on 表或视图名 to use
局部内部类为什么只能访问final局部变量,对于成员变量却可以随便访问? public class OuterClass { private int memberField = 10; public void outerDo(){ final int localField = fromOther(); class InnerClass{ public void innerDo(){ memberField = localField; } }; } private int fromOther()