(String[] args)
| 3 | import java.util.Scanner; |
| 4 | public class SwitchCase { |
| 5 | public static void main(String[] args) { |
| 6 | // TODO Auto-generated method stub |
| 7 | Scanner sc = new Scanner(System.in); |
| 8 | System.out.println("Enter a number from 1 to 5: "); |
| 9 | int num = sc.nextInt(); |
| 10 | switch (num) { |
| 11 | case 1: |
| 12 | System.out.println("You have entered 1."); |
| 13 | break; |
| 14 | case 2: |
| 15 | System.out.println("You have entered 2."); |
| 16 | break; |
| 17 | case 3: |
| 18 | System.out.println("You have entered 3."); |
| 19 | break; |
| 20 | case 4: |
| 21 | System.out.println("You have entered 4."); |
| 22 | break; |
| 23 | case 5: |
| 24 | System.out.println("You have entered 5."); |
| 25 | break; |
| 26 | default: |
| 27 | System.out.println("You have entered a number less than 1 or greater than 5."); |
| 28 | } |
| 29 | } |
| 30 | } |
nothing calls this directly
no outgoing calls
no test coverage detected