All India Exams
Home AptitudeBankEngineeringEnglishGKInterviewOnline TestPlacement PapersReasoning
  • Home
  • Aptitude
  • Bank
  • Engineering
  • English
  • GK
  • Interview
  • Online Test
  • Placement Papers
  • Reasoning

Object Oriented Questions And Answers

Here you can find Object Oriented Questions and Answers.

Why Object Oriented Questions and Answers Required?

In this Object Oriented Questions and Answers section you can learn and practice Object Oriented Questions and Answers to improve your skills in order to face technical inerview conducted by organisations. By Practicing these interview questions, you can easily crack any Exams interview.

Where can I get Object Oriented Questions and Answers?

AllIndiaExams provides you lots Object Oriented Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download Object Oriented Questions and Answers as PDF files and eBooks.

How to solve these Object Oriented Questions and Answers?

You no need to worry, we have given lots of Object Oriented Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the Competitive Exams interview.

Object Oriented PHP Questions and Answers

1. Which method scope prevents a method from being overridden by a subclass?

Object Oriented PHP Questions and Answers

2. Which of the following statements is/are true about Constructors in PHP? (i) PHP 4 introduced class constructors. (ii) Constructors can accept parameters. (iii) Constructors can call class methods or other functions (iv) Class constructors can call on other constructors.

Object Oriented PHP Questions and Answers

3. PHP recognizes constructors by the name.

Object Oriented PHP Questions and Answers

4. Which version of PHP introduced the instanceof keyword?

Object Oriented PHP Questions and Answers

5. Which one of the following functions is used to determine whether a class exists?

Object Oriented PHP Questions and Answers

6. Which one of the following functions is used to determine object type?

Object Oriented PHP Questions and Answers

7. Which one of the following keyword is used to inherit our subclass into a superclass?

Object Oriented PHP Questions and Answers

8. In the PHP code given below, what is/are the properties? < ?php class Example { public $name; function Sample() { echo "This is an example"; } } ?>

Object Oriented PHP Questions and Answers

9. Which keyword is used to refer to properties or methods within the class itself?

Object Oriented PHP Questions and Answers

10. Which keyword allows class members (methods and properties) to be used without needing to instantiate a new instance of the class?

Home EngineeringComputer Science & EngineeringPHP Questions and AnswersObject Oriented PHP

Object Oriented PHP Questions and Answers

This is the questions and answers section on "Object Oriented PHP" with the explanation for various interview, competitive examination and entrance test. Solved examples with detailed answer description, explanation are given and it would be easy to understand.

Object Oriented PHP Questions

Online Test Name Object Oriented PHP
Exam Type Multiple Choice Questions
Category Computer Science Engineering Quiz
Number of Questions 30
1. Which method scope prevents a method from being overridden by a subclass?
  • A. Abstract
  • B. Protected
  • C. Final
  • D. Static
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option C

Explanation:

Final

Workspace

Report Error


2. Which of the following statements is/are true about Constructors in PHP?
(i) PHP 4 introduced class constructors.
(ii) Constructors can accept parameters.
(iii) Constructors can call class methods or other functions
(iv) Class constructors can call on other constructors.
  • A. (ii) and (iii)
  • B. All of the mentioned
  • C. None of the mentioned
  • D. (ii), (iii) and (iv)
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option B

Explanation:

All of the mentioned

Workspace

Report Error


3. PHP recognizes constructors by the name.
  • A. classname()
  • B. _construct()
  • C. function _construct()
  • D. function __construct()
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option D

Explanation:

A double underscore followed by the construct keyword. Its syntax is function __construct ([ argument1, argument2,.....]) { Class Initialization code }

Workspace

Report Error


4. Which version of PHP introduced the instanceof keyword?
  • A. PHP 4
  • B. PHP 5
  • C. PHP 5.3
  • D. PHP 6
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option B

Explanation:

Using instanceof keyword we can determine whether an object is an instance of a class. $manager = new Employee() ¦ if ($manager instanceof Employee) echo "True;

Workspace

Report Error


5. Which one of the following functions is used to determine whether a class exists?
  • A. exist()
  • B. exist_class()
  • C. class_exist()
  • D. __exist()
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option C

Explanation:

The class_exist() function returns true or false according to whether the class exists within the currently executing script content.

Workspace

Report Error


  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • »

Related Topics:

  • HTML Forms
  • Arrays
  • MySQL Basics
  • Functions
  • Exception Handling
  • Variables
  • PHP Basics
  • Strings & Regular Expressions

Mock Tests & Online Quizzes

  • Aptitude Online Test

  • Reasoning Online Test

  • GK Online Test

  • English Online Test

  • RRB Mock Test

  • RBI Mock Test

  • Free SBI Mock Test

  • IBPS Mock Test FREE

  • SSC Mock Test

  • CAT Exam Mock Test

  • GATE Mock Test

  • IT Courses Quiz

Questions and Answers

  • Aptitude Questions
  • Verbal Reasoning Questions
  • Non Verbal Reasoning
  • Logical Reasoning Questions
  • Data Sufficiency Questions
  • Data Interpretation
  • eLitmus Sample Papers
  • ECE Questions and Answers
  • EEE Questions and Answers
  • Verbal Ability Questions
  • GK Questions

Programming Quiz

  • C Programming
  • C++ Programming
  • PHP Programming
  • Java Programming
  • Python Programming
  • DataScience MCQ
  • Hadoop MCQ
  • Mongo DB MCQ
  • MySQL MCQ

Interview Questions

  • Java Interview Questions
  • .Net Interview Questions
  • Networking Interview Questions
  • C Language Interview Questions
  • C++ Interview Questions
  • Testing Interview Questions
  • Android Interview Questions
  • HR Interview Questions
  • Group Discussion Topics

Our Sites

AView.in

© by AllIndiaExams.in. All Rights Reserved | Copyright | Terms of Use & Privacy Policy