1.

Why Java is Partially OOP language?(a) It supports usual declaration of primitive data types(b) It doesn’t support all types of inheritance(c) It allows code to be written outside classes(d) It does not support pointersThe question was asked during an interview.The doubt is from OOPs Basic Concepts in portion OOPs Concept & Features of Object Oriented Programming

Answer»

Right option is (a) It supports usual DECLARATION of primitive data types

Easiest explanation - As JAVA supports usual declaration of data VARIABLES, it is partial implementation of OOP. Because ACCORDING to rules of OOP, object CONSTRUCTORS must be used, even for declaration of variables.



Discussion

No Comment Found

Related InterviewSolutions