java just curly braces

后端 未结 5 1221
一整个雨季
一整个雨季 2020-12-29 05:21

I was reading a book and there were a few example with programs that has just curly braces

for example

 public static void main(String args[]){
             


        
5条回答
  •  有刺的猬
    2020-12-29 06:02

    It's a code block. The variables declared in there are not visible in the upper block (method body outside of these curlies), i.e. they have a more limited scope.

提交回复
热议问题