Page 358 - CA_Blue( J )_Class10
P. 358

c.  Extracting primitive values from objects automatically
                    d.  Inserting code for converting primitive data types into objects
                  ii.  What does the compiler do during autoboxing and unboxing?
                    a.  It removes unnecessary code
                    b.  It inserts code to convert objects into primitive data types
                    c.  It inserts code to convert primitive data types into objects
                    d.  It inserts necessary code automatically
                  2.  In Java, data types can be categorized into primitive and composite (reference) data types.
                    Primitive Data Types: These are the most basic data types provided by Java. They are used to store simple values.
                     byte, short, int, long, float, double, char and Boolean are different types of primitive data types.
                     Composite data types, also known as reference types, are used to store complex objects.
                     The following are different types of Composite data. 1. Arrays 2. Classes 3. Interfaces and Strings
                  i.  What are the two main categories of data types in Java?
                    a.  Simple and Complex data types               b.  Primary and Secondary data types
                    c.  Primitive and Composite data types          d.  Basic and Advanced data types
                  ii.  Which of the following are primitive data types in Java?
                    a.  byte, int, float, String                    b.  short, double, char, Boolean
                    c.  int, long, String, double                   d.  float, char, double, Boolean
                  iii.  Which of the following is NOT a primitive data type in Java?
                    a.  float                                       b.  String
                    c.  boolean                                     d.  char
                  iv.  What are composite data types also known as?
                    a.  Primary types                               b.  Secondary types
                    c.  Reference types                             d.  Object types
                  v.  Which of the following are composite data types in Java?
                    a.  byte, int, char                             b.  float, double, long
                    c.  Arrays, Strings, Interfaces                 d.  short, boolean, double
                Ans.  1. (i) c   (ii) d
                    2. (i) c   (ii) b   (iii) b    (iv) c   (v) c

                   Unsolved Questions


              A.  Tick ( ) the correct answer.

                  1.  Which of the following terms is used to denote the class from which the data is inherited?
                    a.  Base class                                  b.  Derived class
                    c.  Subclass                                    d.  None of these
                  2.  Which of the following types of inheritance is used when more than one type of inheritances coded together?
                    a.  Single inheritance                          b.  Multiple inheritance
                    c.  Multilevel inheritance                      d.  Hybrid inheritance
                  3.  Which of the following variables can be accessed from anywhere?
                    a.  Protected                                   b.  Public
                    c.  Privates                                    d.  None of these
                  4.  Instance Variables are also known as ………………….
                    a.  Static data members                         b.  Non-static data members
                    c.  Local variable                              d.  Instance variable
                  5.  Which of the following is a block?
                    a.  A sequence of statements within curly brackets.    b.  A sequence of statements within square brackets.
                    c.  A sequence of statements within curly parenthesis.   d.  None of these




                356356  Touchpad Computer Applications-X
   353   354   355   356   357   358   359   360   361   362   363