今天的面试题 Here is a table named with 'product'(Table>product(name,type,price)),base on which construct a java bean named with 'product'.不知道该如何做答,请问高手。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 根据表 创建一个JavaBean 叫你做个基于product表的JAVABEAN模型,一个和表结构可以映射的对象 JavaBean的话比较简单啦public class Product{ private string name=""; private string type=""; private string price=""; public Product(){} public Product(string name,string type,string price){ ....//构造函数 } public void setName(string name){ this.name=name; } public void setType(string type){ this.type=type; } public void setPrice(string price){ this.price=price; } public string getName(){ return this.name; } public string getType(){ return this.type; } public string getPrice(){ return this.price; }} 写惯C#了, String 老写成小写, 不好意思 ~不过也有可能是考你 EJB ENTITY BEAN怎么写? 这个就比较BT啦, 谁记得住这么多 在java里如何监控一个文本文件的内容 java实现的FtpClient , 下载到本地后,文件名正确但文件大小为0 谁给我一个文件上传的包 如何让frame的大小固定,不能被用户改变? 关于遍历ResultSet的效率 请教一个线程和GUI合用的问题? 如何在jbuilder8 ide 中写中文注释。 有谁知道IIOException中的一个Sample size must be <= 8 的异常问题!!!!!!! tomcat+apache(sun solaris)如何配置 2维数组的初始化问题 Redhat8+JSP乱码 java语言连数据库的问题
private string name="";
private string type="";
private string price=""; public Product(){}
public Product(string name,string type,string price){
....//构造函数
} public void setName(string name){
this.name=name;
}
public void setType(string type){
this.type=type;
}
public void setPrice(string price){
this.price=price;
} public string getName(){
return this.name;
}
public string getType(){
return this.type;
}
public string getPrice(){
return this.price;
}
}