For the below code, I do not fully get why braces are not needed for the outer for loop? I know if we had them it would be fine but not fully getting why not having them is fine. You do not need braces if the loop's body is one statement. How is the outer's loop's body only one statement, technically is not the scope of the for loop including the inner for loop as well. Does this not mean that the outer for loop does not end till the inner for loop finishes, meaning the inner loop is a part of the outer for loop then right? In this case we should not be able to not use the braces I thought. I might be getting confused with what is consists of the outer for loops's body and the nested for loop.
class HelloWorld{
public static void main(String []args){
for(int i = 0; i < 10; i ++)
for(int j = 0; j < 5; j++)
{
System.out.println("Hello");
}
}
}