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 sorting in java?

984


Why we used break and continue statement in java?

1137


Why is multithreading important?

942


What are the differences between c++ and java?

1132


How can you make sure that your singleton class will always return single instance in multi-threaded environment?

1020


What are passing parameters?

1083


What is final method?

1064


What is the purpose of declaring a variable as final?

965


What is an empty list in java?

960


What are conditionals and its types?

1139


worst case complexities of Quick sort and Merge sort.

1026


Why you should not use singleton?

965


What is an escape character in java?

1036


What is use of arraylist in java?

1176


Why does java not allow multiple public classes in a java file ?

4529