public class Main { public static void main(String[] args) { System.out.println("こんにちは世界"); String[] wareki = {"明治", "大正", "昭和", "平成", "令和"}; for(String name: wareki) { System.out.println(name); } } }
Runcode で実行 C# で配列と一覧