📜  如何在一个消息对话框中显示数组 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:41.727000             🧑  作者: Mango

代码示例1
public static void printArray(double[] array) {
    StringBuilder builder = new StringBuilder();
    for (int a = 0; a < array.length; a++) {
        builder.append(array[a]).append(" ");
    }
    JOptionPane.showMessageDialog(null, builder.toString());
}