aboutsummaryrefslogtreecommitdiff
path: root/test/pretty/resource/after/Switch12.java
blob: 898252235727f4b5b04f9e842f87ec5932b48533 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
public class Switch12 {
	public void basic() {
		switch (5) {
		case 1: 
		case 2: 
			System.out.println("OK");
			break;
		default: 
		}
	}
	public void multiCase() {
		switch (5) {
		case 1, 2: 
			System.out.println("OK");
		default: 
		}
	}

	public int switchExpr() {
		return switch (5) {
		case 1, 2 -> 0;
		case 3 -> {
			break 10;
		}
		default -> 10;
		} + 10;
	}
}