Understanding Block Scopes
A block of code is nothing but everything inside the curly braces {}.
Let's directly look at an example :
public static void main(String[] args){
int a = 10;
{
a = 20;
int b = 30;
}
}
Here, "a" will be accessible throughout...
wottersheep.hashnode.dev1 min read