刚开始 理解:
     JavaBean是 有很多变量,每个变量都有public 的get set 方法.  现在:
    javaBean 是一个组件,封装了n多的功能, 可以再别处随时的调用JavaBean里面的功能
   (在百度百科了看到   为写成JavaBean,类必须是具体的和公共的,并且具有无参数的构造器 )
   javaBean 的构造器一定是无参数的吗  为什么呢 ? 
   望各位高手解释下  谢谢,,   

解决方案 »

  1.   

    任何东西都是JavaBean 
      

  2.   

    找资料看维基百科更好些,特别是英文的JavaBeans are reusable software components for Java that can be manipulated visually in a builder tool. Practically, they are classes written in the Java programming language conforming to a particular convention. They are used to encapsulate many objects into a single object (the bean), so that they can be passed around as a single bean object instead of as multiple individual objects. A JavaBean is a Java Object that is serializable, has a nullary constructor, and allows access to properties using getter and setter methods.JavaBean conventionsIn order to function as a JavaBean class, an object class must obey certain conventions about method naming, construction, and behavior. These conventions make it possible to have tools that can use, reuse, replace, and connect JavaBeans.The required conventions are:    * The class must have a public default constructor. This allows easy instantiation within editing and activation frameworks.
        * The class properties must be accessible using get, set, and other methods (so-called accessor methods and mutator methods), following a standard naming convention. This allows easy automated inspection and updating of bean state within frameworks, many of which include custom editors for various types of properties.
        * The class should be serializable. This allows applications and frameworks to reliably save, store, and restore the bean's state in a fashion that is independent of the VM and platform.默认构造方法就是为了方便框架实例化对象
      

  3.   

    觉得bean是java里最悬疑的概念.
      

  4.   

    感觉javabean就是将私有域共有化
      

  5.   


    同意概念不是问题,是实际运用。就像matrix2里面哪个印度...程序说的“love is just a word”
    好像是这么说的。呵呵good luck
      

  6.   

    我觉得Bean是 多样化的  
    需要什么 我就写什么 我就怎么写 
    呵呵个人体会…………
     
      

  7.   

    bean可以写成多种形式,servlet也可以叫bean.看你怎么用!!!
      

  8.   

    JavaBean 是一种JAVA语言写成的可重用组件。为写成JavaBean,类必须是具体的和公共的,并且具有无参数的构造器。JavaBean 通过提供符合一致性设计模式的公共方法将内部域暴露成员属性。众所周知,属性名称符合这种模式,其他Java 类可以通过自身机制发现和操作这些JavaBean 属性。
      用户可以使用JavaBean将功能、处理、值、数据库访问和其他任何可以用java代码创造的对象进行打包,并且其他的开发者可以通过内部的JSP页面、Servlet、其他JavaBean、applet程序或者应用来使用这些对象。用户可以认为JavaBean提供了一种随时随地的复制和粘贴的功能,而不用关心任何改变。