1
2
3
4
5
6
7 package com.puppycrawl.tools.checkstyle.checks.coding.multiplevariabledeclarations;
8
9 public class InputMultipleVariableDeclarations
10 {
11 int i, j;
12 int i1; int j1;
13
14 void method1() {
15 String str, str1;
16 Object obj; Object obj1;
17 }
18
19
20 java.lang.String string; String
21 strings[];
22
23 java.lang.
24 String string1; java.lang.String
25 strings1[];
26
27 void method2() {
28 for (int i=0, j=0; i < 10; i++, j--) {
29 }
30
31 for(int i=0; i<4;i++) {
32
33 }
34
35 switch("") {
36 case "6":
37 int k = 7;
38 }
39 }
40
41 void method3() {
42 java.lang.Object obj; Object obj1; Object obj2; Object obj3;
43 for (String s : new String[] {}) {}
44 }
45 }