ต่อไปนี้เป็นตัวอย่างทั่วไปของการใช้ไวยากรณ์สวิตช์ นำเข้า Java.util.scanner; = scan.nextint (); "Spring Spring"); : system.out.println ("ไม่เดือนนี้!