0
What is the use of ;
5 Antworten
+ 12
10ks for ask me
+ 6
this was for C++ {Like we use Full Stop (.) after the end of an english statement, we use semi colon (;) at the end of a program statement.
e.g.
1) I am learning to code.
2) cout << "Hello world.";
}
+ 4
It shows the end of the statements in Java. Omitting it will give a compile time error.
+ 2
Like we use Full Stop (.) after the end of an english statement, we use semi colon (;) at the end of a program statement.
e.g.
1) I am learning to code.
2) cout << "Hello world.";
0
Semicolon is needed for parsing the code. Your lines of code look like a 1 line of code for interpreter/compiler, even though you have multiple lines in your code. When prasing comes to the semicolon, interpreter/compiler knows that 'this' string is complete and then checks 'this' string on syntax errors.