Commerce

Classes And Modules MCQs

Practice Classes And Modules MCQs for competitive exams.

Classes And Modules MCQs

Practice questions from this topic.

If A is the superclass and B is the subclass, then subclass inherting the superclass can be represented as

  1. A. B=inherit(A)
  2. B. B=A.inherit()
  3. C. B.prototype=inherit(A)
  4. D. B.prototype=inherit(A.prototype)
Report Error

When a class B can extend another class A, we say that

  1. A. A is the superclass and B is the subclass
  2. B. B is the superclass and A is the subclass
  3. C. Both A and B are the superclass
  4. D. Both A and B are the subclass
Report Error

The property of JSON() method is:

  1. A. it can be invoked manually as object.JSON()
  2. B. it will be automatically invoked by the compiler
  3. C. it is invoked automatically by the JSON.stringify() method
  4. D. it cannot be invoked in any form
Report Error

The meaning for Augmenting classes is that

  1. A. objects inherit prototype properties even in dynamic state
  2. B. objects inherit prototype properties only in dynamic state
  3. C. objects inherit prototype properties in static state
  4. D. None of the mentioned
Report Error

The basic difference between JavaScript and Java is

  1. A. There is no difference
  2. B. Functions are considered as fields
  3. C. Variables are specific
  4. D. Functions are values, and there is no hard distinction between methods and fields
Report Error

Consider the following code snippet : var o = new F () ; o . constructor === F The output would be :

  1. A. false
  2. B. true
  3. C. 0
  4. D. 1
Report Error

The keyword or the property that you use to refer to an object through which they were invoked is

  1. A. from
  2. B. to
  3. C. this
  4. D. object
Report Error

The behaviour of the instances present of a class inside a method is defined by

  1. A. Method
  2. B. Classes
  3. C. Interfaces
  4. D. Classes and Interfaces
Report Error