Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers!
For learning, I would say it depends. If you have a good book or guide, or instructor, and you want to get in-depth, I'd go for C++. It'll allow you to get down the basics of OOP and allow you to get a better understanding of data structures by implementing them yourself.
Java is maybe a little simpler to figure out from a beginner's point of view, so I'm learning towards it. You don't have to worry about memory management, pointers, or implementing your own data structures to do some really cool things. Java has a garbage collector to do memory management for you, and most data structures are already implemented for you, so you can get right down to learning about syntax and data types and what all that "public static void main" business means, and how classes/objects are used, etc. The technical stuff is still very useful to know!
Both languages are very "C like" (C++ obviously being more so haha), so if you learn one, the other will come very quickly to you.
Outside of those two, I've heard Python and C# are good choices for beginner languages, too, though I have no experience with them.
JAVA- Java does not support pointers, templates, unions, operator overloading, structures etc.Java support automatic garbage collection. It does not support destructs as C++ does.Java does not support conditional compilation and inclusion.Exception handling in Java is different because there are no destructors.
C++ - C++ supports structures, unions, templates, operator overloading, pointers and pointer arithmetic.C++ support destructors, which is automatically invoked when the object is destroyed.Conditional inclusion is one of the main features of C++.While in C++, you may not include the try/catch even if the function throws an exception.
For java you won't need to worry about which platform you are developing, the JVM takes care for you.
Java is strictly OOP. One thing not mentioned yet, is that Java does not support multiple inheritance, this can be seen as a pro or con, depends on your point of view, probably a big down is not supporting operator overloading because it will make simpler things like "object_A + object_B" into "object_A.sum(object_B)" (ugly).
Overall, Java provides you a more controlled environment at the cost of less freedom like C++ could give you