0% found this document useful (0 votes)
2 views6 pages

06 JavaBeans

The document discusses Java programming concepts, including AWT, JDBC, Servlets, JSP, and JavaBeans. It provides examples of a Student class with properties and methods for setting and getting values. JavaBeans are defined as Java classes that follow specific conventions, including having a no-argument constructor and implementing the Serializable interface.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

06 JavaBeans

The document discusses Java programming concepts, including AWT, JDBC, Servlets, JSP, and JavaBeans. It provides examples of a Student class with properties and methods for setting and getting values. JavaBeans are defined as Java classes that follow specific conventions, including having a no-argument constructor and implementing the Serializable interface.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java

 AWT

 JDBC

 Servlets

JAVA
 JSP

 JavaBean
Java

class Student
Property
{
int rno;
}
Student o1=new Student();

[Link]=1000;
Java

class Student
{
int rno;
}
Student o1=new Student();

[Link]=1000;
Java

class Student
{
private int rno;
}

Student o1=new Student();

[Link]=1000;
Java Bean
package test; Student o1=new Student();
public class Student
{
[Link](1000);
private int rno;

public void setRno(int rno) int r=[Link]();


{
[Link]=rno;
}
public int getRno()
{
return [Link];
}
}
Java Bean

 JavaBeans are Java classes which adhere to


an extremely simple coding convention. All
you have to do is to

 It provides a default, no-argument constructor.

 It should be serializable and implement


the Serializable interface.

 It may have a number of properties which can be read


or written.

 It may have a number of "getter" and "setter"


methods for the properties.

You might also like