1 /* 2 UnusedLocalVariable 3 allowUnnamedVariables = false 4 5 */ 6 package com.puppycrawl.tools.checkstyle.checks.coding.unusedlocalvariable; 7 8 public class InputUnusedLocalVariableNestedClasses4 { 9 int a = 12; 10 11 void foo() { 12 int a = 12; // violation, unused variable 'a' 13 int ab = 12; // violation, unused variable 'ab' 14 15 class asd { 16 Test a = new Test() { 17 void asd() { 18 System.out.println(a); 19 } 20 }; 21 } 22 } 23 }