mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
encapsulate fields: tests
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
public class A {
|
||||
static int getI() {
|
||||
return 23;
|
||||
}
|
||||
|
||||
static class B {
|
||||
static private int i = 42;
|
||||
|
||||
static int m() {
|
||||
return getI();
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(B.m());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user