F
Flip
I'm having a discussion with someone at work and would like to know if
there are some links I can use. I remember reading, but unfortunately don't
know
any links :< of bean usage and variable declarations.
When you want to create a hard coded value, there are two ways AFAIK to get
the value.
1- create a constant with hard coded value, create an accessor and return
the constant
2-create the accessor and return the hard coded value right in the accessor
Which way do you coders do it and can you suggest any links for references?
Also, where "should" variables be declared? At the top of method or as you
use them? Java lets you do both, but what is the preferred way? I know the
VB way is you HAVE to declare them at the top before any code, but I seem to
remember reading on some Sun site they suggest declaring vars as you use
them. Which do you do in real life?
Thanks.
there are some links I can use. I remember reading, but unfortunately don't
know
any links :< of bean usage and variable declarations.
When you want to create a hard coded value, there are two ways AFAIK to get
the value.
1- create a constant with hard coded value, create an accessor and return
the constant
2-create the accessor and return the hard coded value right in the accessor
Which way do you coders do it and can you suggest any links for references?
Also, where "should" variables be declared? At the top of method or as you
use them? Java lets you do both, but what is the preferred way? I know the
VB way is you HAVE to declare them at the top before any code, but I seem to
remember reading on some Sun site they suggest declaring vars as you use
them. Which do you do in real life?
Thanks.