开始使用免费开始使用

诺奖得主按顺序排

数组非常适合存储同一类型的值。它们可以帮助您按顺序保存信息,例如您最喜欢的诺贝尔物理学奖获得者的时间顺序!

本练习是课程的一部分

Java 入门

查看课程

练习说明

  • 创建一个 String 数组 nobelLaureates
  • 190319211938 赋值给数组 years

交互式实操练习

通过完成这段示例代码来试试这个练习。

class NobelForPhysicsLaureates {
    public static void main(String[] args) {
    	
        // Create a String array called nobelLaureates
        ____ ____ = {"Curie", "Einstein", "Fermi"};
    
    	// Assign values to years
        int[] years ____ ____;
	}
} 
编辑并运行代码