Transcript for:
OOP Interview Questions for Capgemini

Hello friends, I am Anishul and I welcome you all to my channel Tech and Diary In today's video, we are going to discuss the OOPS question which is generally asked in Capgemini Friends, before starting the video, let me tell you that I have already uploaded a lot of videos on my channel about Capgemini I will show you about that now I have posted a last video about technical interview questions I have told you about DBMS and SQL queries and these are of this year which queries were asked for 2020 and I have shared the interview experience of two students last year's interview was of VIT and one was of Galgottia, so you can share this experience I have also discussed technical and HR questions here you can see the data structure, this was round 1 those who have not done round 1 can also watch this video And friends this was the capgemini interview experience This video has gone viral and many people have watched it You also watch it quickly to know what were the technical and HR questions Friends you can also watch on my channel that I upload daily jobs and internship updates Friends you can also watch that I have uploaded about the morning essential Just now a job post has been posted You can also watch this video And I upload daily jobs and internship updates Friends, Subscribe to my channel and press the bell icon so that you can get the latest updates on internship and job updates So, let's start the video with the OOPS questions So, let's start the video First question is Explain OOPS This question is asked in many ways I will tell you all the questions First is Explain OOPS or Explain OOPS Principle explain oops concepts explain oops feature tell me something about oops friends if you were asked 5 questions then they will have only one answer so friends lets see what is the answer it will be oops or object oriented programming is a programming model which is organized around objects instead of processes Second point is instead of a process calling series of processes, this model stresses on communication between objects. Third point is objects that also have sustained provide security by encapsulating its members and providing abstracted interfaces over the functions it performs. Friends, it is provided here that provide security by encapsulating its member means private, provide, whatever your access modifiers are. Now, we will see the following features of OOPs It facilitates four features First is Inheritance for Code Reuse Second is Absection for Modularity, Maintenance and Agility Third is Encapsulation for Security and Protection Fourth is Polymorphism for Flexibility and Interfacing If you say any of these four points Suppose you said the first point Inheritance for code use So you can ask what is inheritance You should know about inheritance This is not asked mainly But yes This is not asked in Capgemini But in other companies Mostly the first question of Poops is what is inheritance You will say second point If abstraction on modularity Maintenance and agility You should know what is abstraction What is it?

you can use it as an example of their real life third is encapsulation meaning for security and protection for security and protection you should have a private access specifier in your mind fourth is polymorphism we will discuss this as well because in capgemini we are asked a lot about polymorphism If you want to see real life examples of OOPS, you can refer to Java D point They have explained every topic in detail by relating many real life examples Second question is what is polymorphism in Java? Polymorphism means the condition of occurring in several different forms Polymorphism in Java is achieved in two manners You can do this in Java in two ways First is Java key don't worry, Java is specific they will ask you about polymorphism Polymorphism is in OOPS, Java is an OOPS language object oriented programming language, that's why they specified it otherwise, there is no need to worry about it you just have to tell the meaning of polymorphism 1st is, Aesthetic polymorphism is the polymorphic resolution identified at compile time and is achieved through function overloading whereas, 2nd is, Dynamic polymorphism is the polymorphic resolution identified at runtime and is achieved through method overriding. So friends this is our what is polymorphism in java Now let's see next question Next the difference between abstract class and interface class Friends this question is also asked a lot Sometimes we ask what is abstract class Definitely we have to do the difference and what is interface So you should know the difference and also know the meanings So first you can tell the difference Abstract class can have both abstract methods Method declaration as well as complete methods Inherited to the derived classes whereas interfaces can only have abstract methods A class can exchange single abstract class whereas it can implement multiple interfaces 3rd question is what are the methods of object class There are many objects, I will tell you 5 of them But you should remember 3 of them 1st one is clone creates and returns a copy of this object second is also equals indicate whether some other object is equal to this one third is also finalize called by the garbage collector on an object when garbage collection determines that there are no more references to the object fourth is also get class returns the runtime class of an object fifth is also hashcode returns a hashcode value for the object and the key in this up Try to remember at least 3 If you can remember more then it's good Because sometimes they ask what are the methods of object class And I will directly ask what is hashcode So you should know that too Now let's see the next question Which access specifier can be used with top level class? Options were given Public or default Public or private Directly public or protected And D was our protected or default If you want to select any of these Options were given So, its answer was public or default Fourth question is what is an immutable class This question is very basic Sometimes, when we are in front of the interviewer We can't answer the questions like What is polymorphism? What is interface?

What is inheritance? So, sometimes he asks very basic questions What is an immutable class? So, its answer is simple Class using which only immutable objects that cannot be changed after initialization Objects can be created. So, you have to give simple answer that Objects that cannot be changed after initialization you can give simple answer in one line. So, next question is Oresh and last question is So, this is our what is the use of synchronized block?

This is very rarely asked but yes it has been asked in Capgemini 2-3 times. This is its answer that The goal of a synchronized block is to achieve mutual exclusion that is at one time the segment of the code should be executed by single thread only enhance the lock needs to be retrieved before executing the segment and then released so friends these were all the questions of oops you can prepare them and see them and friends I am going to refer a site go to java t point and see because there they have explained the concepts of oops very well and they have explained every topic by connecting real life examples like abstraction, inheritance, interface So friends, all the interviewers who haven't done it yet, all the very best for the interview and do it quickly and if you have any doubt, do tell me in the comment section I will solve it for you because many people have demanded for this video I have made the previous video, so I made this video for you all So friends, I will meet you soon in my new video with my new tech update Till then friends, thank you