Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can member fields of an interface be set from some other class

 
ragi singh
Ranch Hand
Posts: 198
Oracle Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an interface with static field . Can we create a reference of the interface and set the member fields of the interface from some other class. ?
 
Chinna Eranna
Ranch Hand
Posts: 174
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interface fields are final by default.

You cannot change, once initialized.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see the JavaRanch naming policy. Please change your display name to conform with this policy. Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic