Friday, 30 October 2020

Java is not 100% pure object-oriented language

 

 

 Java is not 100% pure  object-oriented language because of following  reasons:-


1.   Everything in Java  is not  considered as a Object , there are  primitive  data  types available.


example - For  numbers  we are  using  the  int which  is  not  a object  type. ( only integer is  object type ).



2.  All  feature  of  OOPS language is not  fully  supported  by Java .


example - Multiple  inheritance, operator  overloading  , etc.


For a pure object  oriented  language  ,  there  should  be 6 features available  with it . They are :-


1. Encapsulation /  Information  Hiding .

 

2. Inheritance. 


3. Polymorphism/ Dynamic  Binding .

 

4. All  pre -defined  type  should  be  objects.

 

5. All  operation  performed  by  sending  messages  to  Objects.

 

6. All user - defined  type  are  objects .



But  in java , features  4 and 5  are  lacking . That 's  why  it is not  100%  pure  object oriented programming  language.






3 comments:

Student Marks Calculation app using java

      import javax.swing. *; import java.awt.event.ActionEvent ; import java.awt.event.ActionListener ; public class Student { private J...