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 multithreading and its advantages?

1017


Name few "optional" classes introduced with java 8 ?

1067


What are the methods used to implement for the key object in the hash map?

983


What is the synonym of framework?

938


How do you define a singleton class?

1008


Explain about member inner classes?

1026


What are the ways to instantiate the class class?

1054


How do you declare a string variable?

955


What is the difference between serializable and externalizable interfaces?

1025


Does printwriter create a file?

909


What is fundamental datatype?

939


How many wrapper classes are there in java?

964


Can you pass by reference in java?

935


Can a hashset contain duplicates java?

921


How do I start learning java?

999