Java – why don’t these semicolons produce errors?
•
Java
See English answer > what is the use of an empty statement (not for loop) in Java? [closed] 6
public class Main{ public static void main(String[] args){ System.out.println("blah blah blah and stuff") } }
System.out.println("blah blah blah and stuff");;
public class Main{;;;;;; public static void main(String[] args){;;;;;;;; System.out.println("blah blah blah and stuff");;;;;; };;;;;; };;;;;
Solution
This is called empty statement, which is valid@ H_ 419_ 8@
while (checkCondition()) // may have some side effects ;
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码