| /home/chloe/ASDV-Java/lab8_ChloeFontenot/src/main/java/com/chloefontenot/lab8_chloefontenot/Switch2.java |
/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template */ package com.chloefontenot.lab8_chloefontenot; /** * * @author chloe */ public class Switch2 { public static void main(String[] args) { // Define vars int x = 1, a = 3; switch (a) { case 1: x += 5; case 2: x += 10; case 3: x += 16; case 4: x+= 34; } System.out.println(x + ", " + a); } }