It will get a compiler error in Java.
Declare it final.
if we declare a method as final then it can be changed.
You can declare a class as "final".
Declare the class as final. final class A{ ... }
no one is sure about it thwt when it is going to declare
class MyClass extends AnotherClass {}
a recursive association - as a aggregation is a special form of association, so recursive aggregation can be called as recursive association ... AKASH SISODIYA ......IT ...
They are inversely related. That is: If you declare a method as final you cannot overridden in the child class If you declare a class as final you cannot inherit it in any other class.
when overriding of a class or a method is necessary, they can be declared as abstract
It is dependent on the requirement of your usage of the Object of that class
By using the final keyword in the class declaration statement. Ex: public final class Test {...}
To scope class members to the class (rather than to instances of the class), declare them as static members of the class. Static members are accessible even when no instances of the class exist. As such, static member functions do not have access to a 'this' pointer, unlike ordinary (nonstatic) member functions.