File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static variables

 
Rajiv Chelsea
Ranch Hand
Posts: 88
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are static variables implicitly final or we have to mark them as final?
 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are static variables implicitly final or we have to mark them as final?


No they are not,we have to mark them final.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could have just tried assigning to one. It would have been quicker.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajiv Chelsea wrote:Are static variables implicitly final or we have to mark them as final?


static variables are like instance variables, if you don't initialize explicitly, they will get default value, but for the final you have to explicitly initialize them with a value!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic