We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b7e34a commit d27efc8Copy full SHA for d27efc8
inner_class/static_inner_class/src/Outer.java
@@ -2,6 +2,7 @@ public class Outer {
2
static int x = 10;
3
int y = 20;
4
5
+ // You cannot use the static keyword with a class unless it is an inner class
6
static class Inner {
7
void display(){
8
System.out.println("From Outer class, x is: " + x);
0 commit comments