Why we need to create object for final class and what are its benefits?

Questions by sitaramb

Showing Answers 1 - 3 of 3 Answers

sunny jain

  • Dec 25th, 2014
 

we can not create the object of final class.

  Was this answer useful?  Yes

Bimal Modak

  • Jan 14th, 2015
 

We can create the object of final class and this will act like any simple object created for simple class.

Code
  1. span style="color: #0000ff;">"inside test method."

  Was this answer useful?  Yes

Ahmed reda

  • Jun 29th, 2015
 

A final class cannot have any subclasses. This just means that nobody can create a subclass that modifies behaviour of the final class by modifying internal data or overriding methods so they behave differently. A good example is java.lang.String; by making it final, it is ensured that String objects are and always will be immutable.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions