1 package com.google.checkstyle.test.chapter4formatting.rule462horizontalwhitespace;
2
3
4 public class InputWhitespaceAfterGood {
5
6 int xyz;
7 int abc;
8 int pqr;
9
10
11 public void check1(int x, int y) {
12
13 for (int a = 1, b = 2; a < 5; a++, b--)
14 ;
15 while (x == 0) {
16 int a = 0, b = 1;
17 }
18 do {
19 System.out.println("Testing");
20 } while (x == 0 || y == 2);
21 }
22
23
24 public void check2(final int a, final int b) {
25 if ((float) a == 0.0) {
26 System.out.println("true");
27 } else {
28 System.out.println("false");
29 }
30 }
31
32
33 public void check3(int... a) {
34 Runnable r2 = () -> String.valueOf("Hello world two!");
35 switch (a[0]) {
36 default:
37 break;
38 }
39 }
40
41
42 public void check4() throws java.io.IOException {
43 try (java.io.InputStream ignored = System.in) {}
44 try {
45
46 } catch (Exception e) {
47
48 }
49 }
50
51
52 public void check5() {
53
54 try {
55
56 } catch (Exception e) {
57
58 }
59 }
60
61
62 public void check6() {
63 try {
64
65 } catch (Exception e) {
66
67 }
68 }
69
70
71 public void check7() {
72 synchronized (this) {
73 }
74 }
75
76
77 public String check8() {
78 return ("a" + "b");
79 }
80 }