Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
JAVA_TM_Abstract&Interface

JAVA_TM_Abstract&Interface

Ratings: (0)|Views: 39|Likes:
Published by MITMCA

More info:

Published by: MITMCA on Aug 28, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

09/06/2011

pdf

text

original

 
1
Final and Abstract Classes
 
2
Restricting Inheritance
ParentChild
Inheritedcapability
 
3
 Preventing Overriding of Members in Subclasses
All methods and variables can beoverridden by default in subclasses.
 This can be prevented by declaring themas final using the keyword “final” as amodifier. For example:
final int marks = 100;
final void display();
 This ensures that functionality defined inthis method cannot be altered any.Similarly, the value of a final variablecannot be altered.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->