View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="ArrayTrailingComma"/>
5     </module>
6   </module>
7   */
8   
9   package com.puppycrawl.tools.checkstyle.checks.coding.arraytrailingcomma;
10  
11  // xdoc section -- start
12  public class Example1 {
13    int[] numbers = {1, 2, 3};
14    boolean[] bools = {
15      true,
16      true,
17      false  // violation
18      };
19  
20    String[][] text = {{},{},};
21  
22    double[][] decimals = {
23      {0.5, 2.3, 1.1,},
24      {1.7, 1.9, 0.6},
25      {0.8, 7.4, 6.5}  // violation
26    };
27  
28    char[] chars = {'a', 'b', 'c'
29    };
30  
31    String[] letters = {
32      "a", "b", "c"};
33  
34    int[] a1 = new int[]{
35      1,
36      2
37      ,
38    };
39  
40    int[] a2 = new int[]{
41      1,
42      2
43    ,};
44  }
45  // xdoc section -- end
46  
47  
48  
49