मराठी

Give reason whether the following assignment is correct or not. String str = 'Computer'; - Computer Applications

Advertisements
Advertisements

प्रश्न

Give reason whether the following assignment is correct or not.

String str = 'Computer';

थोडक्यात उत्तर

उत्तर

This assignment is incorrect because the string literal Computer has been enclosed in single quotes. It should be written in double quotes. The correct assignment will be String str = "Computer".

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.03: Values and Data Types - EXERCISES [पृष्ठ ३३]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 1.03 Values and Data Types
EXERCISES | Q III. 12. (c) | पृष्ठ ३३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×