The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - ...
The code consists of about 500+ lines... But basically what Im trying to do is change a variable in the superclass inside the sublass. I thought it was as easy as using super.MethodName(Parameter) call without a need to override the method. The only place where the GlobalMsg is declared is the superclass.
Rajeebs wrote: Now another question coming in my mind. Whether any way to access a method which belong to super class's super class without using any method of class B, like super.super.fn() ?? Isn't this just the same question again? And won't you again just "solve" it by writing some invokeSuperSuperMethod or other? This flawed design is quickly getting out of ...
Consider the following classes Class A { print() { System.out.println("Class A Called"); } } Class B extends A { print() { System.out.println("Class B Called"); } } Class C extends B { print() { System.out.println("Class C Called"); } } How can I call the print method of class A while working in class C ? Please state all possible solutions. Can it ...