信 息 工 程 学 院1Java 程序设计实验 / 实习报告学院 : 信息工程学院班级 : 软件工程123 姓名 : 刘杰学号 :2012013413 成绩 : 多线程异常处理一、实验 / 实习过程实验题 1 修改实验二实验题4,声明一个局部变量String text = ""; 然后通过循环把数组中的成员(有序) 添加到 text中,修改方法 JOptionPane
showMessageDialog(); 参数以显示text
实验过程:与上次实验中的实验四相同,只是添加一个局部变量String text = "" ,赋值到 text 中,通过 JOptionPane
showMessageDialog(); 方法输出
实验代码:Store 类:package cn
nwsuaf
p4; import java
Arrays; import javax
JOptionPane; import cn
nwsuaf
MP3Player; import cn
nwsuaf
Mobile; import cn
nwsuaf
Product; public class Store { public static void main (String[] args) { Mobile mobile1=new Mobile("E365 on China Mobile",1780
0f); Mobile mobile2 = new Mobile("M330 on China Mobile",1450
0f); MP3Player player1= new MP3Player("Meizo X3",256,399
0f); MP3Player player2= ne