Shoken Startup Blog

KitchHike Founder/CTO

2007-05-24から1日間の記事一覧

配列の初期化(newと値の代入を同時に)

int[][] array = { {1,1,1}, {2,2,2}, {3,3,3} }; おそらく、次の2つは等価? int[][] array = { {0,0,0}, {0,0,0}, {0,0,0} }; int[][] array = new int[3][3];

ファイルが存在していたら警告

ポップアップダイアログで警告 int existFile; File file = new File(String Filename); //もしファイルが存在していたら警告ダイアログ if(file.exists()) { existFile = JOptionPane.showConfirmDialog(null, "同じ名前のファイルが存在します。上書きしま…