• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Blank final variable (Urgent - pl help)

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ranchers,
Anybody out there who knows some concrete information on blank final variables. Well, I have lot of doubts on them.
Please share if you know any.
Thanks in advance
Padmini
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Important thing is to note that a final variable doesnot need to be initialized at the time of decleration, but must be initialized before using it. BEFORE INITIALIZATION VAR IS CALLED Blank final var. You can use (invoke) a method to initialize it.
Albert

Originally posted by padmini Babu:
Hi ranchers,
Anybody out there who knows some concrete information on blank final variables. Well, I have lot of doubts on them.
Please share if you know any.
Thanks in advance
Padmini


 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in continuation to the previous reply the blank final variable neednt be initialized at the place where it is declared. it must be initialized in all the constructors for that class.
Hope this helps
-Anand
 
padmini Babu
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Albert Gray:

Important thing is to note that a final variable doesnot need to be initialized at the time of decleration, but must be initialized before using it. BEFORE INITIALIZATION VAR IS CALLED Blank final var. You can use (invoke) a method to initialize it.
Albert
_________________________
Thanks Anand and Albert, just one more confusion
�You can use (invoke) a method to initialize it.� � Can you give an example.
Padmini


 
padmini Babu
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Albert Gray:

Important thing is to note that a final variable doesnot need to be initialized at the time of decleration, but must be initialized before using it. BEFORE INITIALIZATION VAR IS CALLED Blank final var. You can use (invoke) a method to initialize it.
Albert
_________________________
Thanks Anand and Albert, just one more confusion
�You can use (invoke) a method to initialize it.� � Can you give an example.
Padmini


 
reply
    Bookmark Topic Watch Topic
  • New Topic