answersLogoWhite

0

The Final keyword is used to ensure that the methods/variables are not modified/overridden in their child classes.

ex:

public class A {

public void final getName(){

...

}

}

public class B extends A{

public void getName(){

...

}

}

While trying to compile class B, there would be compilation errors. Since the method getName in the parent class is final, it cannot be overridden in the child class.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Which of the keywords above are often used with polymorphic methods?

final


Explain terminal responsibility?

Final responsibility for a team or organization. Example CEO has terminal responsibility for the company. Also used is Ultimate or Final responsibility.


What is the threshold for replacing keywords in a document?

The threshold for replacing keywords in a document is typically determined by the specific requirements of the task or project, as well as the desired level of accuracy and relevance in the final document.


Example cf final paragraph?

Example of final paragraph


What is the return type of finally method in java?

The final and finally keywords have no impact on the return type of a method in Java.


What was the final part of Hamilton's economic program for raising funds?

The final part of Hamilton's economic program was was concerning the creation of national taxes.


What was the final part of Hamiltons economic program raising funds?

The final part of Hamilton's economic program was was concerning the creation of national taxes.


What was Hitlers term for his long-term program for the Jews?

The "Final Solution"


What is the use of the program final cut pro?

Final Cut Pro is a Non-Linear video editing program for Mac, used by professionals and Amateurs alike


Would miss be an example of a final double consonant?

The word "miss" is an example of a final double consonant because it has "ss". Another example: staff


FA Charity Shield 1978 Program value?

1986 League Cup final program value?


What kind of program is Final draft 8?

Final Draft 8 is a screenwriting software program. It is very popular in the entertainment industry, and is consistently ranked in the top 5 in this category of software.