Unnamed repository; edit this file 'description' to name the repository.
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package example;

import java.util.List;

public class Example {
  private int value;

  public Example(int value) {
    this.value = value;
  }

  public int compute(int a, int b) {
    int[] numbers = {
      1,
      2,
      3,
    };
    for (int i = 0; i < numbers.length; i++) {
      if (numbers[i] > a) {
        System.out.println(numbers[i]);
      } else {
        a += numbers[i];
      }
    }
    while (a > 0)
      a--;
    if (a > 5)
      a -= 5;
    for (int i = 0; i < b; i++)
      a += i;
    switch (b) {
      case 1:
        return a;
      case 2:
        return b;
      default:
        return 0;
    }
  }

  String textBlock() {
    return """
unindented
        indented
""";
  }
}

class Braceless {
  void m(boolean cond) {
    if (cond)
      doThing();
    else
      other();
  }
}