Java

I learned Java after mastering C++, thus making Java easy to learn.  The trick to learning java though is not the language, it is the library.  So much of working with Java is knowing what tools are already built for you in the library classes.  There are many things that I like and dislike about Java, mostly based on what is the differences between Java and C++.  One pro, is the interface.  It is a much cleaner way of handing multiple inheritance.  One con is the lack of destructors.  C++ destructors were a good place to release resources, both memory, locks, hardware, etc..  C++ is very explicit on when a destructor is called.  The equivalent in Java is invoked during garbage collection and may never get called.  I am still on the fence about pointers.  In C++ you worked with them explicitly while pointers are hidden from you in Java.  You are less likely to have a memory leak in Java because of this, less likely though not impossible.  I was always careful with dealing with pointers so it was rare that I had memory leaks due to pointers.  Again, I can go both ways.  I do like the concept of smart pointers that are automatically part of Java and have to be explicitly coded into C++.

Java Resources

Learning Java

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.