package p; //initialize in method class A{ private int i; void f(){ switch (1) { case 1: i= 0; break; } } }