Sail E0 Webinar

MCQs

Total Questions : 147 | Page 15 of 15 pages
Question 141. Which of the following is/are true for an abstract class?
1. A class is declared abstract by prefacing the definition with the word abstract.
2. A class is declare abstract by using the keyword implements.
3. It is a class that really isn’t supposed to ever be instantiated but instead serves as a base class.
4. Attempting to instantiate an abstract class results in an error.
  1.    Only 2
  2.    All of the mentioned
  3.    2 and 4
  4.    2, 3 and 4
 Discuss Question
Answer: Option A. -> Only 2
Question 142. If one intends to create a model that will be assumed by a number of closely related objects, which class must be used?
  1.    Normal class
  2.    Static class
  3.    Abstract class
  4.    Interface
 Discuss Question
Answer: Option C. -> Abstract class
Question 143. If your object must inherit behavior from a number of sources you must use a/an
  1.    Interface
  2.    Object
  3.    Abstract class
  4.    Static class
 Discuss Question
Answer: Option A. -> Interface
Question 144. Which method is used to tweak an object’s cloning behavior?
  1.    clone()
  2.    __clone()
  3.    _clone
  4.    object_clone()
 Discuss Question
Answer: Option B. -> __clone()
Question 145. Which feature allows us to call more than one method or function of the class in single instruction?
  1.    Typecasting
  2.    Method Including
  3.    Method adding
  4.    Method chaining
 Discuss Question
Answer: Option D. -> Method chaining
Question 146. You can overwrite a Singleton with the wrong kind of data. 
  1.    TRUE
  2.    FALSE
 Discuss Question
Answer: Option B. -> FALSE
Question 147. PHP have not yet supported constructor overloading. 
  1.    TRUE
  2.    FALSE
 Discuss Question
Answer: Option A. -> TRUE

Latest Videos

Latest Test Papers