Results 1 to 3 of 3
- 04-20-2011, 04:45 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 10
- Rep Power
- 0
are there any other methods to get/set a Java Bean
Java Bean is a criterion of Java object.
For example:
We can say MyBean is a Java Bean.Java Code:public class MyBean { private String a; private String b; public MyBean() { } public String getA() { return a; } public void setA(String a) { this.a = a; } public String getB() { return b; } public void setB(String b) { this.b = b; } }
We can set/get value of MyBean as below:
This is a very right way to get/set value of Java Bean.Java Code:MyBean myBean = new MyBean(); myBean.setA("a"); myBean.setB("b"); myBean.getA(); myBean.getB();
My question is that is there any other methods to implement this function.
Because I think Java Bean should have some standard methods to implement it, otherwise It means Java Bean is equal to simple Java oject.
- 04-20-2011, 08:09 AM #2
You must override equals() hashCode and toString().
JavaBean is used for model in MVC architecture and other frameworks.
It has not implementation specification logic in site.Skype: petrarsentev
http://TrackStudio.com
- 04-20-2011, 03:13 PM #3
)) @jackycui Where did you find this info? I have read your article about Beans. It is strange idea.
Can you explain where it can use?Skype: petrarsentev
http://TrackStudio.com
Similar Threads
-
javax.servlet.jsp.JspException: Cannot find bean org.apache.struts.taglib.html.BEAN i
By gurpreet.singh in forum Advanced JavaReplies: 1Last Post: 03-23-2011, 07:55 AM -
JSP functions and Java Bean methods
By lisa.lipsky in forum JavaServer Pages (JSP) and JSTLReplies: 4Last Post: 07-07-2009, 07:29 AM -
stateless session bean with methods
By mihael in forum Enterprise JavaBeans (EJB)Replies: 1Last Post: 01-15-2009, 08:55 PM -
UREGENT-accessing session bean ok but entity bean
By parimal in forum Enterprise JavaBeans (EJB)Replies: 1Last Post: 08-28-2008, 01:34 PM -
How to use Inner bean definitions via nested bean elements
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:36 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks