Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

fields defined in a bean

 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the spec says ( and where) about the fields that can be defined in a bean .. what are the restrictions

can we declare
..private static int fieldname;


etc..
 
Dan T
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont know where, but if I remember correctly, we are only allowed to declare final static fields. If not declared as final, we must use them as read-only, (ie, not assigning them to other values).
 
Dan T
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually its in the Bean provider must not do list (no time to check now)

ie must not use AWT
not use native library

.... etc
 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
final int x;
final transient x;

Are these statements correct ???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic