第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

有關(guān)Java開發(fā)進階的相關(guān)問題

有關(guān)Java開發(fā)進階的相關(guān)問題

qq_隨心依舊_0 2016-09-21 18:50:10
如何利用Java語言先用集合的方式表示出,然后添加泛型
查看完整描述

1 回答

?
拖鞋_

TA貢獻453條經(jīng)驗 獲得超223個贊

一行是一個對象 ?有4個屬性 先創(chuàng)建個類 比如可以取名 ?ShangPin ? ? (別問我為什么要用漢語拼音~~)

看表你需要在類里面做一個構(gòu)造方法

List<ShangPin> spList=new arrayList<ShangPin>();

然后創(chuàng)建每個對象 添加到list當中


查看完整回答
反對 回復 2016-09-21
  • qq_隨心依舊_0
    qq_隨心依舊_0
    大神,麻煩你寫個代碼唄
  • 拖鞋_
    拖鞋_
    public class ShangPin { private Long spbh; private String spmc; private String splb; private double spjg; public ShangPin(){ } public ShangPin(Long spbh,String spmc,String splb,double spjg){ this.spbh=spbh; this.spmc=spmc; this.splb=splb; this.spjg=spjg; } public Long getSpbh() { return spbh; } public void setSpbh(Long spbh) { this.spbh = spbh; } public String getSpmc() { return spmc; } public void setSpmc(String spmc) { this.spmc = spmc; } public String getSplb() { return splb; } public void setSplb(String splb) { this.splb = splb; } public double getSpjg() { return spjg; } public void setSpjg(double spjg) { this.spjg = spjg; }
  • 拖鞋_
    拖鞋_
    這個是實體類
點擊展開后面5
  • 1 回答
  • 0 關(guān)注
  • 1094 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號