answersLogoWhite

0

It will get a compiler error in Java.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

How can you create a class which cannot be inheritable?

Declare it final.


When do you declare a method or class final?

if we declare a method as final then it can be changed.


How do you prevent extending a class in java?

You can declare a class as "final".


How do you prevent class extending in java?

Declare the class as final. final class A{ ... }


When will be the result of tenth class declare?

no one is sure about it thwt when it is going to declare


The Java keyword is used to declare a class as a subclass of another class?

class MyClass extends AnotherClass {}


What is recursive association?

a recursive association - as a aggregation is a special form of association, so recursive aggregation can be called as recursive association ... AKASH SISODIYA ......IT ...


What is the relationship between inheritance methods and the keyword final?

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 do you declare a method or class abstract in java?

when overriding of a class or a method is necessary, they can be declared as abstract


How many static function can declare in one class?

It is dependent on the requirement of your usage of the Object of that class


When do you declare a class as final?

By using the final keyword in the class declaration statement. Ex: public final class Test {...}


How you declare class scoped variables and member functions?

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.