信 息 工 程 学 院1Java 程序设计实验 / 实习报告学院 : 信息工程学院班级 : 软件工程123 姓名 : 刘杰学号 :2012013413 成绩 : 多线程异常处理一、实验 / 实习过程实验题 1 修改实验二实验题4,声明一个局部变量String text = ""; 然后通过循环把数组中的成员(有序) 添加到 text中,修改方法 JOptionPane.showMessageDialog(); 参数以显示text 。实验过程:与上次实验中的实验四相同,只是添加一个局部变量String text = "" ,赋值到 text 中,通过 JOptionPane.showMessageDialog(); 方法输出。实验代码:Store 类:package cn.edu.nwsuaf.jp.p4; import java.util.Arrays; import javax.swing.JOptionPane; import cn.edu.nwsuaf.jp.p4.data.MP3Player; import cn.edu.nwsuaf.jp.p4.data.Mobile; import cn.edu.nwsuaf.jp.p4.data.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= new MP3Player("Meizo E5",512,580.0f); MP3Player player3= new MP3Player("Xlive XM MP3Player",256,930.0f); Product[] products ={mobile1,mobile2,player1,player2,player3}; Arrays.sort(products); String text=""; for (int a=0;a