हिंदी

Find errors in the following snippet: int a = 5, b = 3; if (a <= b) System.out.println(a); else System.out.println(c = a + b); - Computer Applications

Advertisements
Advertisements

प्रश्न

Find errors in the following snippet:

int a = 5, b = 3; 
if (a <= b) 
   System.out.println(a); 
else 
   System.out.println(c = a + b); 
एक पंक्ति में उत्तर

उत्तर

Assignment statement can't be used along with the print statement.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1.08: Conditional Statements in Java - Review Insight [पृष्ठ ९७]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 1.08 Conditional Statements in Java
Review Insight | Q 5. (a) | पृष्ठ ९७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×