「Java」 java.util.Arrays.asListの使い方

定義
private final static List<String> cityList = Arrays.asList(
“Tokyo",
“Oosaka",
“Fukuoka",
“Yokohama"
);

使い方
for (String cityName : cityList) {
//処理
}

Software

Posted by arkgame