Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

doubt on final keyword

  Asked By: Bertha    Date: Jun 20    Category: Java    Views: 1120

iam new to java. i have some confusion on final keyword.

this keyword is used to prevent method overloading.

but in thread, join() and isAlive() are declared as final.

eventhough it is final, these are used.

not in directly,

all the methods are directly acted on obj.

but here why, double dot.

if u know the explanation pls send it to me.



1 Answer Found

Answer #1    Answered By: Dinh Tran     Answered On: Jun 20

i think if the final  keyword is used to prevent  method overriding.... not method
overloading..when a method  Adds in class Calc is declared final and class
Calculate extends Calc then it cannot define Adds method in the Calculate class
ie it cannot be overridden.... when a method is declared final then it cannot be

Didn't find what you were looking for? Find more on doubt on final keyword Or get search suggestion and latest updates.