File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -58,14 +58,14 @@ class Frog {
5858
5959### Some points to remember here
6060
61- * Static method __ cannot access__ a instance(non-static) variable.
61+ * Static method __ cannot access__ a instance(non-static) variable directly. They can access through a object reference .
6262{% highlight java %}
6363public static int getFrogSize() {
6464 return frogSize; // compiler error
6565}
6666{% endhighlight %}
6767
68- * Static method __ cannot access__ a instance method.
68+ * Static method __ cannot access__ a instance method directly. They can access through a object reference .
6969{% highlight java %}
7070public static int getFrogSizeSum() {
7171 int size = getFrogSize(); // compiler error
@@ -131,4 +131,3 @@ class Bar extends Foo {
131131{% endhighlight %}
132132
133133
134-
You can’t perform that action at this time.
0 commit comments