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

Difference between serialization and deserialization in java?

1151


Which collection is best for sorting in java?

1132


What does a boolean method return?

1244


What are variable names?

987


What is the difference between yield() and sleep()?

1018


What is the primary benefit of encapsulation?

1092


What is use of static method?

1059


How do you compare characters in java?

997


What is the purpose of java?

1015


How does java pattern compile work?

973


Does treeset allow null in java?

964


What is a stringbuffer?

977


What is the benefit of inner classes in java?

1096


What is string subsequence method?

1134


How many functional interfaces does java 8 have?

1033