• 0

Which Is Best C++ or Java?


Question

19 answers to this question

Recommended Posts

  • 0

If it is only a choice between the two and you are having a cold start from absolutely no code experience. Java.

 

Use something like BlueJ - https://www.bluej.org/ - as a learning aid and it will teach you basics plus object orientation concepts. There is a textbook you can use with it too

https://www.amazon.com/Objects-First-Java-Practical-Introduction-dp-1292159049/dp/1292159049?&linkCode=ll1&tag=camie06-20&linkId=0683199be58fe4b45e129ef3d84cc291&language=en_US&ref_=as_li_ss_tl

 

If you already understand O-O or have some language experience, BlueJ will be too basic for you, but in general Java will allow you to progress to C++, C# and others fairly easily if that is where you want to go. If you want to wind up as a web developer though, neither especially good starting points really.

  • Like 2
  • 0
On 18/07/2023 at 11:04, Ravikant said:

If you ask beginners to learn a programming language then what would you suggest?

C#, PowerShell, Python, Rust, or Julia... definitely not C++ or Java.

C# looks like Java but has real-world contextual uses.

Rust has been made to replace C and C++.

Edited by Fleet Command
  • 0
On 19/07/2023 at 04:56, Fleet Command said:

C#, PowerShell, Python, Rust, or Julia... definitely not C++ or Java.

C# looks like Java but has real-world contextual uses.

Rust has been made to replace C and C++.

But rust will never replace c and c++, specially in embedded devices. It can coexist though but I doubt it will ever replace it.

  • 0

Guys, come on, I think we can be a little bit more friendly with someone beginning the path.

 

On 18/07/2023 at 09:34, Ravikant said:

Hello,

If you ask beginners to learn a programming language then what would you suggest Java or C++?

 

Thanks

Ravikant, we would love to know what is your ultimate goal with learning a programming language:

  1. Is it to build a web app?
  2. Is it to work in AI, Data Science and Machine Learning?
  3. Is it to do some game development?
  4. Is it to make a desktop application?
  5. Is it to work on Internet of Things (IoT)
  6. Is it to work on hardware

 

Depending on what you want to do, there will be a programming language suited for the task.

Even though all of the most well-known will let you work on those things.

  • 0
On 19/07/2023 at 17:20, Arceles said:

But rust will never replace c and c++, specially in embedded devices. It can coexist though but I doubt it will ever replace it.

Device drivers and embedded devices are primary targets of Rust. It certainly can replace C and C++ there. Whether it does depends on our adoption.

  • 0
On 19/07/2023 at 10:37, Fleet Command said:

Device drivers and embedded devices are primary targets of Rust. It certainly can replace C and C++ there. Whether it does depends on our adoption.

Yeeaaaah no. I work a a very big comany regarding all sort of embedded and safety critical devices in automotive. They are not going to throw away years of testing and certification (ASIL) because of a languaje that at best is equal to c.

  • 0
On 19/07/2023 at 20:26, Arceles said:

Yeeaaaah no. I work a a very big comany regarding all sort of embedded and safety critical devices in automotive. They are not going to throw away years of testing and certification (ASIL) because of a languaje that at best is equal to c.

I worked in the auto industry too. That means I know that large company of yours if you name it. I know their procedures too. It's not up to them. They'll use whatever programming language IATF  mandates. IATF already has a migration plan to Rust, albeit their target is 2030. ASIL is the main reason for the move. C is not memory-safe. Rust is safe. ASIL concerns itself with safety.

Rust isn't equal to C; it is orders of magnitude superior.

  • 0
On 19/07/2023 at 12:28, Fleet Command said:

I worked in the auto industry too. That means I know that large company of yours if you name it. I know their procedures too. It's not up to them. They'll use whatever programming language IATF  mandates. IATF already has a migration plan to Rust, albeit their target is 2030. ASIL is the main reason for the move. C is not memory-safe. Rust is safe. ASIL concerns itself with safety.

Rust isn't equal to C; it is orders of magnitude superior.

Well that is for us to see in 2030 as you mention. Even if it is the case ASIL is just one example. 2023 and there are nowhere near the plans you menton on sight, not even for the 2029 projects already contemplated here. And I would like for you to point a document in which the IATF says that, as I cannot find one in the first google page at least using "IATF rust 2030".

  • 0
On 19/07/2023 at 22:04, Arceles said:

Well that is for us to see in 2030 as you mention. Even if it is the case ASIL is just one example. 2023 and there are nowhere near the plans you menton on sight, not even for the 2029 projects already contemplated here. And I would like for you to point a document in which the IATF says that, as I cannot find one in the first google page at least using "IATF rust 2030".

If you work in the auto industry, you must know the correct place to search is the LOC document system. I'm not surprised it didn't show on a Google search, though. It's not newsworthy. Barely any of our accords appear in the news.

Be that as it may, I answered the question, "What programming language do you suggest the beginners to learn?", not "What programming language pays the most in the auto industry."

  • 0
On 19/07/2023 at 12:51, Fleet Command said:

If you work in the auto industry, you must know the correct place to search is the LOC document system. I'm not surprised it didn't show on a Google search, though. It's not newsworthy. Barely any of our accords appear in the news.

Be that as it may, I answered the question, "What programming language do you suggest the beginners to learn?", not "What programming language pays the most in the auto industry."

Rust would be a big news and so much that it would appear on google. Even autosar results (albeit not for classic) appear. So no, there is no indication of rust being targetted for 2030.

  • 0
On 19/07/2023 at 23:14, Arceles said:

Rust would be a big news and so much that it would appear on google. Even autosar results (albeit not for classic) appear. So no, there is no indication of rust being targetted for 2030.

You claim to work for a large auto parts supplier but you don't even query our native LOC. What could possibly be the reason? I wonder...

What large company did you say you work for?

Edited by Fleet Command
  • 0
On 19/07/2023 at 13:56, Fleet Command said:

You claim to work for a large auto parts supplier but you don't even query our native LOC. What could possibly be the reason? I wonder...

What large company did you say you work for?

I do not have to tell you my credentials here, I however can tell you that I work for one of the IATF associate company. I do not have credentials to check said document but I can ask for them. Still, directly loking ant our product portfolio for 2029 and asking also my managers I can tell that there is no rust on sight.

  • 0

I think for super small apps C++ can be competitive with Java. But once the app gets bigger and starts using many threads you see that C++ apps usually cannot compete with Java apps in terms of performance and stability (bugs). So you see that Cassandra is many times faster, in realistic cases more than 25x faster than mongoDB. Cassandra is Java and mongoDB is mainly C++

Of all the languages I know, I notice that C++ apps often have the most bugs, usually significantly worse than C and Python apps. I think this has to do with the design and syntax of the language, which is one of the worst in existence. But further, it is also true that C++ programmers are often not the best programmers which exacerbates the problem.

If you want to know what are the best languages purely in terms of developer productivity, design of the language, features and performance, I would recommend the following languages

1. Haskell

2. Common Lisp (and similar languages like Clojure and Scheme)

3. Scala

4. Nim

5. Pascal

6. Zig

7. Julia

The reasons why Haskell is better than most other languages:
1. much higher productivity than e.g. Python and most other languages
2. far fewer bugs on average than e.g. Python and C
3. perfect for parallel processes and multi core processors
4. in reality Haskell apps often have similar performance to C apps, since you are usually limited in time. with Haskell you have many times more time to optimize performance
5. very powerful capabilities. for example, Julia's multiple dispatch is one of the best out there. But Haskell has something that is actually even more powerful than Julia's multiple dispatch. From a purely technical (not including libraries) point of view, there is nothing better suited for Data Science than Haskell.

  • 0

When I was in college the first programming course I took was c++ followed by java. C++ was significantly easier for me to learn although that was probably due to my Java professor not speaking any english.

Frankly I wouldn't recommend either of these languages to someone new to programming, I would recommend they take a look at https://codecademy.com and start with whatever looks like it does what you want it to.

 

I highly doubt the nuances of performance, memory management, etc. would be important to a new programmer who is still getting the hang of programming logic and syntax.

  • 0

When I was in engineering school (a little over 10 years ago), I spent a lot of time writing Java code.   I guess it's good for learning the depths of coding, but I don't use it in my professional life.  I also had a lot of embedded C classes, and I absolutely use that.  I highly recommend C, if you're interested in the embedded hardware route.
My software engineer colleagues use Python for scripting and also for simple PC apps.  Colleges seem to be focusing on Python more, which is great.  For more complex PC applications, C# and .NET are good choices.  For mobile app development, I guess you'll use whatever is convenient for iOS and/or Android.

Overall, it depends on what applications you want to get good at, whether it's hardware, software apps, mobile apps, etc.  I definitely don't recommend just focusing on Java though, if you even bother with Java at all.

If I was just beginning, here's what I'd start with:

https://www.coursera.org/specializations/coding-for-everyone
https://www.coursera.org/specializations/python

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Posts

    • RapidRAW 1.5.7 by Razvan Serea RapidRAW is a beautiful, non-destructive, GPU‑accelerated RAW image editor designed for speed and simplicity. It uses a lightweight (~30 MB), efficient code base built with Rust, React and Tauri. Ideal for Lightroom workflows, it offers rich editing tools—exposure, contrast, highlights, shadows, whites/blacks, tone curves, HSL mixer, dehaze, vignetting, film grain, sharpening, clarity and noise reduction—processed in real-time on the GPU. Features include intuitive masking (brush, linear, radial, AI-powered subject and foreground detection), generative edit layers (via ComfyUI), 32‑bit precision, and full RAW format support through rawler. RapidRAW also provides library management (folder navigation, ratings, metadata, EXIF viewer), batch operations, export presets (JPEG/PNG/TIFF), sidecar editing (.rrdata), undo/redo history, customizable UI themes, smooth animations, resizable panels, and preset copy/paste. A modern high-performance Lightroom alternative with polished UX and creative tools, RapidRAW brings powerful photo editing to photographers seeking speed, responsive GPU feedback, and streamlined workflows. RapidRAW v1.5.7 release notes: This update serves as a direct follow-up to the core architectural migration introduced in v1.5.6. While the transition to a more modular state management system marked a significant step forward for RapidRAW's stability and long-term maintainability, it also introduced several edge cases and regressions within the library and editing workflows. This release focuses on addressing those issues, with a particular emphasis on a complete overhaul of library performance to ensure smooth and responsive browsing following the refactoring. It also resolves inconsistencies in the copy-and-paste workflow and expands RapidRAW's accessibility by adding support for eight additional languages. [full changelog] Download: RapidRAW 1.5.7 | ARM64 | ~20.0 MB (Open Source) View: RapidRAW Home Page | Screenshot | Other operating systems Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Thank god they got rid of the disgusting looking sidebars, and the corner radius looks much better, too. Two things I hated on day one, and never got used to.
    • JetBrains launches Rider 2026.2 EAP 5, bringing several AI improvements by David Uzondu JetBrains has released the fifth EAP version of Rider 2026.2, bringing a faster startup flow with the new non-modal startup screen and quality-check hooks for Claude Code and Codex. In the latest EAP release, Rider now has newly bundled "quality-check" hooks that run background tests on code edits before the external agent proceeds. For example, after Claude Code rewrites a class, Rider immediately triggers a PostToolUse hook that analyzes the code for syntax errors and formatting warnings. It then passes those findings back to the model as feedback, allowing the agent to fix its own output before finalizing the task. If Rider detects compilation errors, the IDE prevents the agent from treating the task as complete, while minor formatting warnings simply help guide the model toward better output. The "Explain with AI" feature can now tackle tricky build errors directly from the console, helping .NET developers who frequently wrestle with multi-targeting failures and MSBuild errors. JetBrains introduced Explain with AI back in the 2024.1 release cycle. With this feature, instead of forcing developers to copy long diagnostics into a separate chat window, Rider now lets you trigger these explanations directly from the error source. In similar EAP news, JetBrains recently opened the first EAP for IntelliJ IDEA 2026.2, with features that appeal to both those who are into AI-assisted coding and those who prefer "classic" manual development. For manual developers, the release adds revamped dependency completion for Maven and Gradle build scripts, which pulls data directly from the local cache to suggest relevant versions. It also brings the Spring Debugger update, displaying security indicators next to endpoints to visualize secured routes during runtime. In addition to database migration tools for Flyway and Liquibase, this build introduces a Hibernate debugger that shows the exact SQL or HQL queries that the framework plans to execute, letting developers jump directly to the Java code that triggered them.
  • Recent Achievements

    • Very Popular
      Captain_Eric earned a badge
      Very Popular
    • One Month Later
      amusc earned a badge
      One Month Later
    • One Month Later
      DJC50PLUS earned a badge
      One Month Later
    • Week One Done
      DJC50PLUS earned a badge
      Week One Done
    • Proficient
      Eric Biran went up a rank
      Proficient
  • Popular Contributors

    1. 1
      +primortal
      504
    2. 2
      PsYcHoKiLLa
      223
    3. 3
      ATLien_0
      87
    4. 4
      Steven P.
      80
    5. 5
      +Edouard
      80
  • Tell a friend

    Love Neowin? Tell a friend!