信息工程学院1Java程序设计实验/实习报告学院:信息工程学院班级:软件工程123姓名:刘杰学号:2012013413成绩:多线程异常处理一、实验/实习过程实验题1修改实验二实验题4,声明一个局部变量Stringtext="";然后通过循环把数组中的成员(有序)添加到text中,修改方法JOptionPane
showMessageDialog();参数以显示text
实验过程:与上次实验中的实验四相同,只是添加一个局部变量Stringtext="",赋值到text中,通过JOptionPane
showMessageDialog();方法输出
实验代码:Store类:packagecn
nwsuaf
p4;importjava
Arrays;importjavax
JOptionPane;importcn
nwsuaf
MP3Player;importcn
nwsuaf
Mobile;importcn
nwsuaf
Product;publicclassStore{publicstaticvoidmain(String[]args){Mobilemobile1=newMobile("E365onChinaMobile",1780
0f);Mobilemobile2=newMobile("M330onChinaMobile",1450
0f);MP3Playerplayer1=newMP3Player("MeizoX3",256,399
0f);MP3Playerplayer2=newMP3Player("MeizoE5",512,580
0f);MP3Playerplayer3=newMP3Player("XliveXMMP3Player",256