Explain the usage of the following special symbol in Java: ,(comma)
Advertisements
प्रश्न
Explain the usage of the following special symbol in Java:
,(comma)
स्पष्ट कीजिए
Advertisements
उत्तर
The comma (,) is used in Java to separate multiple variables in a declaration and to separate arguments in a method call. It helps distinguish different items written within the same statement.
Example:
int a = 10, b = 20, c = 30;
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
