Explain the usage of the following special symbol in Java: ;(semicolon)
Advertisements
प्रश्न
Explain the usage of the following special symbol in Java:
;(semicolon)
स्पष्ट करा
Advertisements
उत्तर
The semicolon (;) is used in Java to indicate the end of a statement. It is known as a statement terminator. It tells the Java compiler where one statement ends and helps separate individual statements in a program. A semicolon is generally required at the end of variable declarations, assignment statements, and method calls.
Example:
int a = 10;
int b = 20;
System.out.println(a + b);
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
