java program writing

JAVA's if usage, such as if(...){} and if() without curly brackets, what is the difference between writing the following directly

When there are curly brackets, everything in 
the curly brackets is managed by if. It will only execute if the condition is true.
When there are no braces , only the following sentence belongs to the if management, that is to

say, when there is only one sentence, the braces can be omitted and the others are no different.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325777046&siteId=291194637