1 /* 2 UnusedLocalVariable 3 allowUnnamedVariables = false 4 5 */ 6 package com.puppycrawl.tools.checkstyle.checks.coding.unusedlocalvariable; 7 8 public class InputUnusedLocalVariableNestedClasses5 { 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 abc { 16 Test a = new Test() { 17 void abc() { 18 System.out.println(a); 19 int abc = 10; // violation, unused variable 'abc' 20 21 class def { 22 Test abc = new Test() { 23 void def() { 24 System.out.println(abc); 25 } 26 }; 27 } 28 } 29 }; 30 } 31 } 32 }