課程
/后端開(kāi)發(fā)
/Java
/JAVA遇見(jiàn)HTML——Servlet篇
items i1 = new items(1,"沃特籃球鞋","溫州",200,500,"001.jpg");?
2017-03-18
源自:JAVA遇見(jiàn)HTML——Servlet篇 2-8
正在回答
public Items(int id,String name,String city,int price,int number,String picture)
{
this.id = id;
this.name = name;
this.city = city;
this.picture = picture;
this.price = price;
this.number = number;
}
初始化方法老師那邊寫(xiě)了,然后沒(méi)有顯示,java默認(rèn)是無(wú)參的構(gòu)造方法,然后你要在里面添加一個(gè)public Items(int i, String string, String string2, int j, int k, String string3);方法就可以解決了。
舉報(bào)
本門(mén)課程在JSP課程的基礎(chǔ)上,深入介紹Servlet的基礎(chǔ)知識(shí)
2 回答在構(gòu)造方法中初始化字段有什么好處?
3 回答MyEclipse10新建web項(xiàng)目創(chuàng)建類(lèi)時(shí)報(bào)錯(cuò)
1 回答eclipse創(chuàng)建servlet,之后怎么辦?百度了好久也沒(méi)搞定。。
1 回答創(chuàng)建不了web
3 回答DAO包是什么?ItemDAO是什么時(shí)候創(chuàng)建的?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢(xún)優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-06-25
public Items(int id,String name,String city,int price,int number,String picture)
{
this.id = id;
this.name = name;
this.city = city;
this.picture = picture;
this.price = price;
this.number = number;
}
2017-03-19
初始化方法老師那邊寫(xiě)了,然后沒(méi)有顯示,java默認(rèn)是無(wú)參的構(gòu)造方法,然后你要在里面添加一個(gè)public Items(int i, String string, String string2, int j, int k, String string3);方法就可以解決了。