Which of the following is not an OOP concept in Java?

205    Asked by ChloeBurgess in Java , Asked on Dec 20, 2023

Among the four options given which option is not true regarding the OOP concept in terms of Java programming language? Here are the options given below:-

Inheritance

Encapsulation

Polymorphism

Lambda expression

Answered by Chris Dyer

Among all the options given the one option that is not true for Which of the following is not an OOP concept in Java? is option 4 which refers to the Lambda expression. Instead of OOP, it is a functional programming paradigm that was introduced in Java 8. It is mainly used for enabling functional interfaces so that they can be treated as functional interfaces and facilitate the use of functional programming concepts like map, filter, reduce, etc.

Option 2 which refers to the “ inheritance” is true about the OOP concept in Java. It is used to allow a class to inherit properties from another class.

Option 3 which refers to the “Encapsulation” is again an OOP concept in Java. It is mainly used in bundling of data into a single unit. It also helps in data hiding and protection of the day from outside inheritance.

Option 4 which refers to the “ Polymorphism” is also an OOP concept of Java. It is mainly used in allowing objects to be treated as u stances of their parent class. It is of two types; compile-time polymorphism and runtime polymorphism.



Your Answer

Interviews

Parent Categories