Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can final class be used?

Answer Posted / user

One scenario where final is important, when you want to prevent inheritance of a class, for security reasons. This allows you to make sure that code you are running cannot be overridden by someone.

The best example is
public final class String

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is boolean logic?

1024


What is the purpose of the System class?

1002


Is list thread safe in java?

921


What is ellipsis in java?

1085


What environment variables are required to be set on a machine in order to run Java programs?

1190


How many types of memory areas are allocated by jvm?

1043


What is the purpose of sizeof operator?

1054


How do you get the length of a string in java?

1008


What is the benefit of singleton pattern?

985


What do you mean by hashing?

1108


explain different ways of using thread? : Java thread

1011


When do we use hashset over treeset?

1060


What is the hashcode () and equals () used for?

1036


What is a byte array?

1099


What is gc()?

1068