PHP WEB DEVELOPMENT INTERVIEW QUESTIONS AND ANSWERS PREPARED BY ME OF PITANGENT ANALYTICS AND TECHNOLOGY SOLUTIONS PVT. LTD FOR FRESHERS (OOP'S CONCEPTS IN PHP - PART 3)

  PHP WEB DEVELOPMENT INTERVIEW QUESTIONS AND ANSWERS PREPARED BY ME OF PITANGENT ANALYTICS AND TECHNOLOGY SOLUTIONS PVT. LTD FOR FRESHERS (OOP'S CONCEPTS IN PHP - PART  3)

Q1. Explain Encapsulation with a real-time example.

Ans: Encapsulation allows us to hide the attributes and methods within a class so that other classes won't have access to them. Real-Time Examples : Car, Bank Account. etc.

Q2. What is the difference between class and object with example.

Ans: Class - Class is a container which contains group of functions, variables and other class objects. Class is also known as the blueprint of objects. For ex. :  class Car{...}.

Object - Object is the instance of a class. For ex. : $car1=new Car(), $car2=new Car().

Comments

Popular posts from this blog

Programmings Based On Array And String Functions To Merge The 2 Arrays, Then After Merge Convert Into String And Then Find Out The 1st And Last Word From The Reverse String

PHP WEB DEVELOPMENT INTERVIEW QUESTIONS ASKED IN APOLLO HOSPITAL ALONG WITH MY OWN CONCEPTS AND MY OWN EXPLANATION ANSWERS(PART - 1) REST OF THE QUESTIONS AND ANSWERS WILL BE PREPARED BY ME IN MY NEXT BLOG

Mini Project On Multi User CRUD Operations(Create, Read, Update & Delete) Of Donar Details Of Indian Nationals Who Donate To Ramkrishna Math, Belur Math Using PDO (PHP Data Objects) With Proper Explanation Of Each And Every Individual Line Of The Code Of connection.php Page, form.php Page, formaction.php Page, admin_display.php Page, client_display.php Page, edit.php Page, editaction.php Page And delet.php Page (Here You Will Find The Image Of Sayang Sri Ramkrishna Dev, Sayang Sri Ma Sarada Devi & Sayang Sri Swami Vivekananda) In My CRUD Operation