What is the scope of variables declared inside a static block in java?

前端 未结 4 2021
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 03:36

Are variables declared inside a static block accessible anywhere else? What \"kind\" of member are they(ie., are they static member, too?)

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-14 04:15

    they are like method variables. Only accessible in the block scope.

提交回复
热议问题