• 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

    • Windows 11 KB5094126 June 2026 Patch Tuesday update now available to download by Sayan Sen Microsoft has released the June 2026 Patch Tuesday updates for Windows 11 25H2, 24H2. The 25H2 and 24H2 update is provided via KB5094126 (manual download link below), build 26100.8655 on 24H2, and build 26200.8655 on 25H2, after applying the updates. Windows 11 23H2 is available under KB5082052 (build 22631.6936). Microsoft has not published changelog yet. We will update the article once it's out. [Update: It's out] [Secure Boot] With this update, Windows quality updates include additional high confidence device targeting data, increasing coverage of devices eligible to automatically receive new Secure Boot certificates. Devices receive the new certificates only after demonstrating sufficient successful update signals, maintaining a controlled and phased rollout. [Virtualization] Fixed: This update addresses an issue that could result in Stop errors HYPERVISOR_ERROR (0x20001) and KMODE_EXCEPTION_NOT_HANDLED (0x1E) after installing KB5089573 on some devices during system restarts, virtual machine operations, or while running some gaming applications Microsoft says there are no known issues. These updates will be available from Windows Update and should install automatically in most cases. If you would like to download these updates for offline installation, you can get them from the Microsoft Catalog website. You can find the update for 25H2/24H2 at this link.
    • Price Drop: Save 90% on ChatPlayground AI lifetime plan, and compare multiple AI models by Steven Parker Today's highlighted deal comes via our Apps + Software section of the Neowin Deals store, where for only a limited time, you can save up to 90% on ChatPlayground AI: Lifetime Subscriptions. ChatPlayground AI puts the world’s top AI models in one powerful interface, letting you enter a single prompt and instantly compare outputs from multiple models to choose the perfect response for your needs. Boost productivity and creativity with access to the latest AI giants like GPT-4o, Claude Sonnet 4, Gemini 1.5 Flash, DeepSeek V3, and dozens more — all in one window. Whether you’re chatting, coding, generating images, or refining prompts, ChatPlayground AI equips you with advanced tools like prompt engineering, image/PDF chat, saved conversations, and AI image creation, plus priority support to keep your workflow seamless. Access the world’s best AI models Side-by-Side Comparisons: Enter one prompt & instantly view results from multiple AI models to find the best output for your needs 40+ AI Models: Includes GPT-4o, Claude Sonnet 4, Gemini 1.5 Flash, DeepSeek V3, Llama, Perplexity, and many more Multi-Function Platform: Access AI for chat, image generation & coding all within a single interface Web Browser Extension: Offers a Chrome extension to seamlessly integrate the platform into your browsing workflow Boost productivity with powerful features ChatPlayground Interface: Designed for seamless AI model comparison in one window Prompt Engineering: Refine & optimize your prompts for better, more accurate responses Chat with Images & PDFs: Upload visuals and documents to get context-aware answers Saved Chat History: Keep track of past conversations for reference & ongoing projects AI Image Generation: Create high-quality visuals powered by top AI image models Priority Customer Support: Get faster assistance whenever you need it What you'll get with the Unlimited Plan Includes unlimited messages/month Built for prompt engineers, startups, and teams who run experiments nonstop Includes priority access to new features and future models Good to know Length of access: lifetime Redemption deadline: redeem your code within 30 days of purchase Access options: Desktop Max number of device(s): Unlimited Available to both NEW & Existing users Updates included A lifetime subscription to ChatPlayground AI (Unlimited Plan) normally costs $619, but you can pick it up for just $59.97 for a limited time - that represents a saving of $614 (90% off). Click the link below for more details, always check terms and specifications before making a purchase. Get this ChatPlayground AI (Unlimited) for $59.97 (was $619) There are also two other discounted plans to choose from. Although priced in U.S. dollars, this deal is available for digital purchase worldwide. Support queries If you have queries or need support for any of the Neowin Deals, please use the contact form here. Neowin Deals are managed and sold by StackCommerce who represent Neowin on an affiliate basis. Why we post these deals We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. So for those that keep moaning and complaining, be thankful we're still online for you to even do that. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
    • Amazon Deal: These AMD RX 9070 XT GPUs are very good offers by Sayan Sen Following the release of AMD's new RX 9070 GRE last week for $549 (our review), AMD currently has a couple of great deals on the more powerful 9070 XT wherein the GPU is on sale for $650. We already covered the Gigabyte Gaming model a couple of days ago which is still live at that price. Aside from that, the white ICE variant is also at the same price (purchase link under the specs table down below). This is interesting to note considering white cards are generally more expensive as they come with a premium attached. Similar to the Gaming model, the ICE card too employs Gigabyte's WINDFORCE cooling system which combines multiple design elements such as alternate-spinning Hawk fans, a vapor chamber, and composite heat pipes to manage heat dissipation. The Server-grade Thermal conductive gel further helps in this department. The inclusion of a semi-passive cooling mode allows the fans to remain inactive under low workloads, which allows for reduced noise operation during lighter usage. There is dual BIOS switch that allows toggling between performance and silent modes. The tech specs of the card are given in the table below: Specification Value Boost Clock Up to 3060 MHz (Reference Card: 2970 MHz) Game Clock Up to 2520 MHz (Reference Card: 2400 MHz) Stream Processors 4096 Memory Size 16 GB Memory Type GDDR6 Memory Clock 20 Gbps Memory Bus Width 256-bit PCI Express Interface PCI Express 5.0 Max Resolution 7680 × 4320 Maximum Displays Supported 4 Display Outputs 2 × DisplayPort 2.1a 2 × HDMI 2.1b Card Dimensions 288 × 132 × 56 mm (L × W × H) (2.7 slot) Recommended Power Supply 750 W Power Connectors 3 × 8-pin PCIe Get it at the link below: GIGABYTE Radeon™ RX 9070 XT Gaming OC ICE 16G Graphics Card (GV-R907XGAMINGOCICE-16GD): $649.99 (Sold and Shipped by Amazon US) (Was: $750) If your budget is lower, check this Nvidia RTX 5060 Ti 8GB deal out for only $330 wherein you get the latest James Bond game free. This Amazon deal is US-specific and not available in other regions unless specified. This is a first-party seller link (at the time of article publishing); ensure that you also purchase from a first-party seller link only. If you don't like it or want to look at more options, check out the previous deals that we have covered, OR you can also visit Amazon US deals page. Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days. As an Amazon Associate, we earn from qualifying purchases.
    • What about it? The old MV2 version will not work.
  • Recent Achievements

    • Week One Done
      rubentuben8 earned a badge
      Week One Done
    • Week One Done
      ARaclen earned a badge
      Week One Done
    • One Year In
      jojodbn earned a badge
      One Year In
    • One Month Later
      jojodbn earned a badge
      One Month Later
    • Week One Done
      jojodbn earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      516
    2. 2
      PsYcHoKiLLa
      229
    3. 3
      +Edouard
      118
    4. 4
      ATLien_0
      87
    5. 5
      Steven P.
      83
  • Tell a friend

    Love Neowin? Tell a friend!