Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Rules round up doubt.

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Can some body please explain the following qn from rules round up?
"If a final variable is a reference to an object, can the object's data member be modified while the program is running?"
What does "final variable is a reference to an object mean"?
I think i have seen this question being answered somewhere in the forum,but I dont exactly remember.Please help me by either giving a reference to that site or an explaination.
Thanks.
bye,
Aparanji
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aparanji,
Perhaps the following code helps you understand the concept. If not, shout back!

Ajith
 
Aparanji Raju
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Ajith.
It is clear to me now that I cant change/create a new address when i have a final object reference,but can change its contents.
Thanks again.
Aparanji.
 
reply
    Bookmark Topic Watch Topic
  • New Topic