Timeline for Using super keyword to access super class members
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 2, 2015 at 3:16 | comment | added | With A SpiRIT | Thankyou for your response @MichaelT.You have helped a lot. | |
| Dec 2, 2015 at 3:06 | comment | added | With A SpiRIT | @MichaelT This doesn't work because you cannot access non-static fields with reference to their class name. | |
| Dec 1, 2015 at 8:18 | comment | added | Darsstar | @WithASpiRIT Try A.this.i, it might work. That sort of syntax is used when you want to access an outer class from an inner class. | |
| Dec 1, 2015 at 4:58 | comment | added | With A SpiRIT | Thank you @MichaelT.Does that mean i cannot access the third variable "i" inherited to the class C by Class B.I mean as class A will have three variables named "i", i can access two of them using just "i" and "super.i" but what about the third one? | |
| Dec 1, 2015 at 3:52 | history | answered | user40980 | CC BY-SA 3.0 |