I wanted to learn object oriented programming language, I don't want it for any purpose just to know the whole concept of OOP. So can anyone tell me which language I should start learning?
Some further suggestions:
The best book I've ever read on OOP bar none is Bertrand Meyer's Object Oriented Software Construction. It's not an 'easy' read in that you'll need to think hard in places. But it does the best job I've seen of explaining OO principles.
As for languages: I'd stay away from C++. Just too big for learning purposes. If you want a language that will really help you understand OO (as opposed to one that you would write mainstream apps in / get a job using) then look at smalltalk. Or Eiffel (the language in Meyer's book above).
If you want a language that's a bit more mainstream but still faithfully supports OO principles then Python is a good bet. Java & C# are decent too if you want static typing.
One word of caution though: the language won't teach you OO. It can only help (or hinder) in how well it supports OO concepts. Learning OO is really about learning to think in OO terms. For that I'd come back to Meyer's book.
You can learn any of the object oriented languages such as C++, Java, C# etc. to try out OOPS.
If you really want to learn OOP, you need to think beyond languages and understand that it is a paradigm that helps mangae complexity involved in software programs just like how we manage them in this real world. Then learn the basic concepts in OO like Polymorphism, Inheritance, Encapsulation (PIE) etc
There are good books around too-Object-Oriented Analysis and Design with Applications (2nd Edition) by Grady Booch
Also, you may try out blogs like this which i found is simple enough to start with- fascinatingoops.com
You want to learn OOP? One answer - Smalltalk.
It is an elegant language and is OO to the core. You will learn OOP from the beginning and won't be hampered by all the other distractions that other languages manage to incorporate.
Smalltalk wins. And there are some good free e-books available too (see: Stephane Ducasse)
You would have to learn C++, or maybe one of the forefathers like Smalltalk. C++ offers a clean separation between concepts like object orientation, memory management, and reference vs value, and it has strong generic support.
Don't learn Java or a .NET language like C#. When you learn a language like Java, then you learn things like "Objects are always on the heap and are always references", which is only true for Java and absolutely not true for OOP in general. This conflation of concepts (object-orientation, memory management, reference vs value) is very dangerous for a first language, because once you get them stuck in your head, it can be very hard to get them back out. C# is somewhat better in this regard but not much. In addition, they can have a high tendency to teach "Inheritance is a hammer and everything is a nail" with weak generic programming support.
Best way to learn OOP concepts is to write more and more code and get it reviewed often. Practice maketh a good programmer.
Think real world scenarios, define a problem statement - solve it in code and get it reviewed. You can always get the help from https://codereview.stackexchange.com/ for reviews :)
- Learn what they mean.
- Learn how to implement them.
- Take a project to develop, choose your language [which should have OOPS principle integrated like VB.NET or C# or C++ or java etc]
- Think about how you can simplify the project logic by OOPS. [Note: Don't just implement OOPS because you wanted to have them, they should solve your purpose]
- Don't forget: You will learn from your mistakes too.
My first contact to the OO world was C++, which was not a bad start. But I improved a lot when learning Python. The difference comes from the languages: trying out ideas ('how can I solve this problem in a OO fashion ?') in C++ needs more code to be written and includes much more pitfalls than trying out the same idea in Python. So I would recommend Python.
I don't think you should look into another language while trying to learn OOP. To me, it's easier to grasp the theory and then learning to apply it if I can relate to something I already know. Figuring out a new syntax just gets in the way.
You can start with any OOP book. Again, I'd get one in my language of choice. Reading a book on refactoring (OOP Style) helped me in the application of OOP. I took an existing project (No distraction from requirements gathering) and found new ways to improve it. It wasn't just OOP for OOP sake. Then you can learn how to do it from start to finish on a new project. The logic here is you won't always get it right from the start. If you can recognize where it is appropriate, you'll be better off. Like most things it won't solve every problem.
There are definite limitations with some languages. If your goal is to be the master of multiiple inheritance, .NET is out.
I'll go against the conventional thinking here and suggest that the easiest languages for using OOP aren't necessarily the best languages for learning it. I was first exposed to OOP with C++, but I didn't "get" it until reading Larry Wall's Camel book chapter on OOP with Perl. For some reason I had trouble grasping the difference between classes and objects until having to explicitly bless an object into a class. I didn't truly understand the underlying implementation of OOP until doing it in C with GObject, where none of those details are hidden from you. I didn't truly understand the best practices until taking a corporate class that was language-agnostic. It's a very big topic, and you have to find ways to learn it that work best for you.