मराठी

Which of the following is an invalid statement? (a) A class is a composite data type (b) Statement import is used for including a package (c) Primitives have fixed size (d) String is a primitive

Advertisements
Advertisements

प्रश्न

Which of the following is an invalid statement?

पर्याय

  • A class is a composite data type

  • Statement import is used for including a package

  • Primitives have fixed size

  • String is a primitive

MCQ
Advertisements

उत्तर

String is a primitive

Explanation:

This statement is invalid because String is a non-primitive (reference) data type in Java. Unlike primitive types (like int, char, or double) which hold raw values directly in fixed memory slots, a String is an object instantiated from a full class in the java.lang package designed to hold and manipulate character sequences.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 5: Library Classes - Exercises [पृष्ठ १३३]

APPEARS IN

रूपा पंडित Computer Applications [English] Class 10 ICSE
पाठ 5 Library Classes
Exercises | Q 1. (vii) | पृष्ठ १३३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×