0
Can we acces in same class static block element outside of block ?
I firstly declared static block with some variable defined inside it but when I was try to access in operation it does not found variable by the compile time error..... please reply early
5 Réponses
0
I think we can't access maybe right or wrong
0
class A{
static {
int a=10,b=3;}
public static void main(String[] args){
System.out.println(a+b);
}
}
0
with constructor is it possible