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 / jayant gope

Final is keyword that can be used with class, method and also with the variable.

Class: When final is used with the class, it means that class cannot be further extended or inherited by the other classes. So, final keyword restricts class from being inherited.

Method: When final is used with the method, this means that method cannot be overridden.

Variable: When final is used with the variable, it makes the variable constant i.e. the variable cannot be further modified.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

'A class is a template for an object' explain this statement.

1099


What is the static block?

1119


What is the difference between a choice and a list?

1131


Why a dead thread occurs?

1026


What is a cup of java?

1061


What is an example of a conditional statement?

1101


What is mean by exception?

1078


What are the changes in java.io in java 8 ?

1080


Which method cannot be overridden in java?

1043


In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?

1118


What is the syntax and characteristics of a lambda expression? Explain

1093


What are bind parameters?

1093


What is the difference between multiple processes and multiple threads?

1293


What are the topics in core java?

1126


Can a class with private constructor be extended?

1001