Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is OOP and which concepts are a core part of OOP ?

 
Andy Jack
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure I know what is the essence of OOP and what is not. Is it essentially just this - being able to represent everything as fields and methods, ie encapsulation ? http://en.wikipedia.org/wiki/Object-oriented_programming Wikipedia says that OOP is also about polymorphism, Inheritance etc. But, are those things the essence of OOP or peripheral features ?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15369
40
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The essence is really that you model concepts with objects. Whether specific features such as classes, inheritance and polymorphism are "fundamental" or "peripheral" features is really a theoretical discussion and for many features there isn't even a clearly correct answer, it depends on opinion.

Most current popular OO programming languages support classes, inheritance, polymorphism and other features that are commonly thought of as principal OO features, but not all of them do; JavaScript for example doesn't have classes, but it's still considered an OO language by many people.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic