我希望用我在学校用 jCreator 制作的这个漂亮的小程序给我的父母一个惊喜,感谢任何和所有的帮助。我的问题是我自己不会理解任何高级说明,所以我要求您以初学者可以理解的方式说出您的答案。我可以在学校使用 JDK,所以这应该不是问题,请列出我可能需要的任何必要材料。谢谢!
import java.util.Scanner;
public class Calender {
public static void main(String args[]){
System.out.println("\nCALENDER.JAVA\n");
Scanner keyboard = new Scanner(System.in);
System.out.println("Determine birthstone using numbers 1-12 represent calender months");
System.out.print("Enter Month Number ===>> ");
int month = keyboard.nextInt();
System.out.println();
switch (month){
case 1: System.out.println("January Garnet"); break;
case 2: System.out.println("February Amethyst"); break;
case 3: System.out.println("March Aquamarine"); break;
case 4: System.out.println("April Diamond"); break;
case 5: System.out.println("May Emerald"); break;
case 6: System.out.println("June Pearl / Alexandrite"); break;
case 7: System.out.println("July Ruby"); break;
case 8: System.out.println("August Peridot"); break;
case 9: System.out.println("September Sapphire"); break;
case 10: System.out.println("October Opal / Tourmaline"); break;
case 11: System.out.println("November Citrine / Topaz"); break;
case 12: System.out.println("December Tanzanite / Turquoise / Zircon"); break;
default : System.out.println("This is not a valid entry.");
}
System.out.println();
}
}