• Post Reply Bookmark Topic Watch Topic
  • New Topic

FINAL OBJECT  RSS feed

 
kul karni
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guyz,

Went through a lot of posts here, as well as on google, but dont have the clarity of a final object.

Can somebody give me a simple example of what can and cannot be done by creating a final object.

Thanks.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are no "final objects". A variable can be final, which means that once it has been initialized, its value cannot be changed.

Note, however, that if the object that the variable refers to is not immutable, it's still possible to change the content of the object.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!