हिंदी

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
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Variables and Expressions - EXERCISE [पृष्ठ १३५]

APPEARS IN

धीरज मेहरोत्रा Computer Science [English] Class 12
अध्याय 6 Variables and Expressions
EXERCISE | Q 60. (b) | पृष्ठ १३५
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×