Hi Team,
I have created an extension class for SalesConfirmDP but got below error while rebuilding.
I guess, it is happening because of final keyword declaration. If yes , than how I can resolve this issue?
Pls give me more shed on this.
thanks!
The general recommendation is never using public instance variables. Such a design allows other classes to take dependency on implementation details of your class and it may harm maintainability and extensibility a lot.
Instead, expose the value through a public method. Then you can change the implementation (e.g. change the value how you store the data or add extra logic, such as raising an event on value change) without changing the public interface of the class.
Thanks Girish
It depends on your requirement. Mostly it will be public only. If you declare it as public it will be accessible in all the methods.
Thanks,
Girish S.
Thanks Girish,
Is it always public access modifier to declare in extension class?
Pls give me more shed on this
Hi,
In extension classes if you declare variables globally then you must give access specifier to a variables like below.
Public SalesConfirmDetialsTmp confirmDetailsTmp;
Public int i;
Public int serialization;
Thanks,
Girish S.
I'm sorry, but I still don't know what you want to solve.
Let me know how can I solve this? What changes are required?
What problem do you see there to solve?
Protected members are used with inheritance and you can't inherit from final classes. And there is no point in having anything else than a final class, because the extension class is instantiated by the system (in a very special way) and it would never use a child class if there was any. Therefore it's all as it should be.
André Arnaud de Cal...
291,996
Super User 2025 Season 1
Martin Dráb
230,853
Most Valuable Professional
nmaenpaa
101,156