❮ Previous Next ❯

Java final keyword


Example;
class A
{
final int x=100;
void get()
{
x=200;      //compile time error
}


Final variable : value never changed

Final method : method never overridden

Final class : class never inherited

Can final method inherited?
Yes, it is possible we can inherit final method but cannot override it.

 

❮ Previous Next ❯


  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved