1 package com.google.checkstyle.test.chapter4formatting.rule4821onevariableperline;
2
3
4 public class InputFormattedOneVariablePerDeclaration {
5 int mnp, efg;
6 int i1;
7 int j1;
8
9 void method1() {
10 String str, str1;
11 java.lang.Object obj;
12 Object obj1;
13 }
14
15
16
17 java.lang.String string;
18 java.lang.String[] strings;
19
20 java.lang.String string1;
21 java.lang.String[] strings1;
22
23 void method2() {
24 for (int i = 0, j = 0; i < 10; i++, j--) {
25 }
26
27 for (int i = 0; i < 4; i++) {}
28 }
29
30 class Inner {
31 int xyz, qwe;
32 int i1;
33 int j1;
34
35 void method1() {
36 String str, str1;
37
38 java.lang.Object obj;
39 Object obj1;
40 }
41
42
43
44 java.lang.String string;
45 java.lang.String[] strings;
46
47 java.lang.String string1;
48 java.lang.String[] strings1;
49
50 void method2() {
51 for (int i = 0, j = 0; i < 10; i++, j--) {
52 }
53
54 for (int i = 0; i < 4; i++) {}
55 }
56
57 Inner anon =
58 new Inner() {
59 int abc, pqr;
60 int i1;
61 int j1;
62
63 void method1() {
64 String str, str1;
65
66 java.lang.Object obj;
67 Object obj1;
68 }
69
70
71
72 java.lang.String string;
73 java.lang.String[] strings;
74
75 java.lang.String string1;
76 java.lang.String[] strings1;
77
78 void method2() {
79 for (int i = 0, j = 0; i < 10; i++, j--) {
80 }
81
82 for (int i = 0; i < 4; i++) {}
83 }
84 };
85 }
86
87 class Suppress {
88 @SuppressWarnings("unused")
89
90 long q1, q2, q3;
91 @SuppressWarnings("unused")
92 long q4, q5, q6;
93
94 }
95 }