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
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
