Errors, bugs, questions - page 1677
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I didn't write anything about opening and closing prices.
Why an error for private methods?
Why is there an error for private methods?
Private has nothing to do with it, your function is declared as final and you are trying to override it.
ZS. I tried to compile - the compiler says what the problem is.
Private has nothing to do with it, you declare this function as final.
So there are no parent private-methods in an inherited class. That's why there shouldn't be any overriding.
Hello there.
Public inheritance. The private methods of the parent are not available from the descendant, according to the compiler.
A private virtual method of a base class cannot be called from an inheritor, but you can override it, which is what you are trying to do.
A closed virtual method of a base class cannot be called from an inheritor, but can be overridden.
I'll try to make a similar example to get a better understanding.
That's a nice touch.
I guess such a construction could come in handy somewhere.
public inheritance. The parent's private-methods are not available from the descendant, according to the compiler.