Learn C++ better or Learn Java

Hello,

First I should say a little about myself. I’ve been programming in Python, PHP, C# and Objective C for iOS apps for a few years now and recently I started learning C++ .

Also due to family issues, I had to quit my job and move after 6 years and I’m currently looking for a new Programming gig.

It seems that everywhere I look people are mostly looking for Java or C++ people.

I learned the basics of C++ and the basics of Java. (More so C++). To be honest with Java… I got board. It was like I double click to open eclipse and …………waiting…………waiting………… Yay I can start coding finally. Wait I’m too tired now from waiting.

okay maybe its not that bad. but with a newer Macbook Pro Retina it shouldn’t take that long to start a basic IDE. I’ve tried Idea too.

but when it comes to c++ using Xcode or Visual Studio. I love it! I know people may think I’m crazy for that but I really do! However I really do need to learn about data structures and get lots of practice. So I’m still at the beginning stages. plus the first package I tried to work with I had a hard time with. (libcurl) I did get it to work but did have to resort to looking at documentation.

After doing some research I did read that if you use Java in interview testing you don’t have to worry about memory management. I still have to learn about that too. Its it a big deal to learn? Or just clearing memory when closing the program?

The only real reason that I’m looking at Java is because a few people have told me its better for the extra libraries and tools and for data structures. Also there is that interview testing thing with memory management.

Right now I’m still working with C++ and practicing and learning 10+ hours a day and loving it.

but is it work learning java? or just become better in C++?

I’m leaning towards c++ and so far everything is coming natural to me. (other then libcurl).

Thank You
Last edited on
I did get it to work but did have to resort to looking at documentation.

The documentation should be the starting point, not a last resort.
After doing some research I did read that if you use Java in interview testing you don’t have to worry about memory management.


Java is the same as .NET. With a garbage collector you don't have to worry about memory management.

What kind of programs do you like to program? Both languages, while they are still general purpose, are used for different tasks. Java for example, is great to use when building a server for its standard networking library, C++ is great for 3D games for example, since you can nearly directly use the hardware. It's hard to say which one is better, both have their strong and weak points.
Man just pick one and use it. No point in trying to pick between pros and cons, they all have their advantages which is niche to them.

For example
C++ allows you to write games for UnrealEngine
Java gives you a bunch of tools within the JVM itself so that if you learn to use them, you will be invisible (not literally)

I started with C++, but I've used Java more than due to school and I'm sure if I went back and revised my C++, I can easily bring my knowledge up to the level I am with Java. Pick one and stick with it, master it and no one will doubt your ability to program
Thank You for the reply everyone,
My Ultimate goal would be working on a OS of some sort.

Like OS X, Linux, etc..

I'm going to stick with C++ and master it. I'm pretty sure java would be a easy switch after. I've read after posting this that most jobs including google would hire a c++ dev even if they need someone for java. So I figured if I need to learn it later I will. for now I'll enjoy the c++ness;
You would have a hard time writing an OS in Java. It's not impossible, just nearly impossible. Java requires a virtual machine to emulate its bytecode, you'll need to write that in C or assembly anyways to start with. Or you'll need hardware support, but no home computer I know executes Java bytecode directly. You will have to stick with C++ (and probably C and assembly too) to write a real OS.

Writing an OS takes quite a long time and experience though, I started writing one and it doesn't look like it will be ready any time soon. It will probably take around a year more before the basic console OS is running, but nevertheless, it is a fun project.
I would say any novice programmer should master himself in C++ first, and then he/she can easily switch to other languages. I am also just a beginner , so I think C++ will be a good move.
Learn Java. Once you understand concept of Java. It is very simple and easy.
It's true that Java is indeed a bit simpler, but it lacks quite a few features as well. If you know C++, you know all concepts Java supports and a lot of low-level concepts. Pointers for example are an important part of most modern-day programs, but Java has no direct pointer arithmetic (it's all hidden from you). Learning C++ first also teaches you how to properly manage your memory, unlike Java, which does all of this for you. To learn all features of programming, I would recommend C++ over Java, especially if you want to write low-level code.
First I should say a little about myself. I’ve been programming in Python, PHP, C# and Objective C for iOS apps for a few years now and recently I started learning C++ .



One problem that I've had in the past moving from one language to another is not having that base of code that I get accustomed to when programming in a comfortable language- but spending time writing programs that have a purpose really improves the collection of those essential functions. Maybe you should spend some time porting one of your existing projects into your new languages?
Topic archived. No new replies allowed.