Both languages are perfectly fine. It depends more on the person using them. Personally, I learned C++ first, and then because Java is derived from C++, I learned Java pretty quickly.
Java is probably going to be easier to understand (syntax wise) than C++ is many cases (not all) and is far more portable due to its JVM. (Java irtual Machine) However, this will also slow it down, but this wouldn't be noticeable on most competent computers.
Java is a very high level language compared to C++. This can be both good and bad, depending on the application.
As I said, it all depends on the person, and the type of programming you want to do, but both languages are great and more than competent for many purposes. If I were you, I would start with C++. That way, if you wanted to learn Java later, it would be much easier to understand. The tutorial on this site is great. http://cplusplus.com/doc/tutorial/
I would say, as a first language Java might be better. I wouldn't know as my first language was Pascal, but there are quite a few things about C++ that I still even now find hard to chew sometimes, so I am not sure if it's a good idea to start off with C++. Though once you get a basic understanding of how stuff works, it doesn't really matter anymore what language you are using (difficulty wise I mean).
Starting with C++ has the advantage that you'll learn how to deal with manual memory allocation from the start using techniques like RAII. In Java RAII is not really possible and when ignoring resources other than memory, not necessary either.
People who switch from Java to C++ often continue to use what they're used to, but sometimes forget they have to delete the objects they create using new when they no longer need them - or for that matter, they tend to use new when it's not necessary.
However, starting with Java has the advantage that you'll likely learn proper OOP from the start.
With C++ this entirely depends on the sources you use to learn the language and it's a sad fact that >90% of them are pure and utter shit, teaching what is often derisively called "C with classes".
So when switching from Java to C++, people will try to use the concepts they already know, which - in this context - is a good thing.
tl;dr: learn Java or make sure to acquire a good C++ book.
I didn't yet see a single introductionary Java book that teaches real objected programming, and I don't think it should either - I'd say proper OOP is a bit over the head of most beginners.
And I don't really see an advantage in learning RAII when you are not working with C++ anyways. There is a chance that this might lead to bad habits, but I can't imagine someone really having troubles with learning that a new means that there should also be a delete somewhere.
And I don't really see an advantage in learning RAII when you are not working with C++ anyways.
There's no need. It would be nice to be able to employ it in Java for things other than memory (file descriptors, locks), but since you can't properly implement it, you don't need to know about it.
The point I was trying to make that you will need to know about it when switching to C++ - then it would help if you're familiar with it or at least have heard of it. If not, you'll happily pepper your code with deletes everywhere - potentially too few or too many.
but I can't imagine someone really having troubles with learning that a new means that there should also be a delete somewhere.
Yeah, an intelligent person shouldn't have any problems with that.
Unfortunately, there are quite a few people who do seem to have problems with it.
IMHO i say that if you are new to programing and you want to learn, realy want to learn
you should start from 0...start learning about basic programing , hot to think structurate and how to make some pseudocode.
C is good starting point..you might love it.
When you say C++ you talk about OOP (in general) and ofcourse you can learn OOP without knowing structured programing but then you will always depend on C++ libraries.
I guess it all depends on what your goals are. Is this a hobby or do you want to be a professional? If so which path do you want to take, Computer Science or Computer Information Systems? There is a difference, the latter producing the majority of the computer programmers in the industry. CS enrollments are at an all time low unfortunately and their are great opportunities for Computer Scientists right now.