Jump to content

I'm would consider myself fairly new to the programming field, Knowing the basics of Web programming (HTML, javascript, CSS), python and c++, and I was just wondering is it worthwhile to learn Java?  From what I've read (not much), C++ can do almost anything that java can do.  So my questions are as Following:

 

  1. Are There any distinct differences between Java and C++?
    1. what are they?
  2. is there Any reason to learn java if I am somewhat familiar with c++?
Link to comment
https://linustechtips.com/topic/891287-which-one-is-better-to-learn-java-or-c/
Share on other sites

Link to post
Share on other sites

I've been working on a project where everything related to GUI his Java. Reach have their strengths and weaknesses. Slightly different approaches as well as speed and performance benefits. But it's definitely important to learn. It's used on a lot of applications. Better to diversify than not.

Link to post
Share on other sites

Whichever. Learning how to code Java or C++ are both good choices. 

Cor Caeruleus Reborn v6

Spoiler

CPU: Intel - Core i7-8700K

CPU Cooler: be quiet! - PURE ROCK 
Thermal Compound: Arctic Silver - 5 High-Density Polysynthetic Silver 3.5g Thermal Paste 
Motherboard: ASRock Z370 Extreme4
Memory: G.Skill TridentZ RGB 2x8GB 3200/14
Storage: Samsung - 850 EVO-Series 500GB 2.5" Solid State Drive 
Storage: Samsung - 960 EVO 500GB M.2-2280 Solid State Drive
Storage: Western Digital - Blue 2TB 3.5" 5400RPM Internal Hard Drive
Storage: Western Digital - BLACK SERIES 3TB 3.5" 7200RPM Internal Hard Drive
Video Card: EVGA - 970 SSC ACX (1080 is in RMA)
Case: Fractal Design - Define R5 w/Window (Black) ATX Mid Tower Case
Power Supply: EVGA - SuperNOVA P2 750W with CableMod blue/black Pro Series
Optical Drive: LG - WH16NS40 Blu-Ray/DVD/CD Writer 
Operating System: Microsoft - Windows 10 Pro OEM 64-bit and Linux Mint Serena
Keyboard: Logitech - G910 Orion Spectrum RGB Wired Gaming Keyboard
Mouse: Logitech - G502 Wired Optical Mouse
Headphones: Logitech - G430 7.1 Channel  Headset
Speakers: Logitech - Z506 155W 5.1ch Speakers

 

Link to post
Share on other sites

Java often relies on external libraries for certain things and needs a lot of bloat to do even the simplest tasks. C++ can do anything and teaches you more about how things work, and there is more room for improvements/optimizations because you are not limited by a runtime/vm. If you're new to programming and want to learn a lot I'd recommend plain old C actually. A lot of Linux/open source software is written in C - reading the code of other people can teach you a lot more than books ever could! ;)

Link to post
Share on other sites

What are you looking to do? If you're trying to get into competitive programming C++ is much better because you can optimize stuff properly and tons of the algorithms have already been implemented in C++.

 

Java is great for day-to-day programming. There's almost a library out there for everything and the package management and debugging is really nice.

 

If you're looking for a job, both these languages would be great.

Want to know which mobo to get?

Spoiler

Choose whatever you need. Any more, you're wasting your money. Any less, and you don't get the features you need.

 

Only you know what you need to do with your computer, so nobody's really qualified to answer this question except for you.

 

chEcK iNsidE sPoilEr fOr a tREat!

Link to post
Share on other sites

C++ usually has higher performance than java. You can see it clearly in java vs c++ video from android authority channel on YouTube. 

 

Java is good for cross platform. You can pretty much write it once and it can run anywhere, macs, Linux, windows, bsd, Unix, you name it. I use it mainly for android app devwlopment

 

i am learning c++ now alongside one of its GUI, QT5

Sudo make me a sandwich 

Link to post
Share on other sites

As mentioned already, it depends on what you want to do.  But here are a few of my observations:
 

C++:

Generally better to learn as it is used for most main-stream applications.  It's very powerful but development is usually for a single platform.

Java:
Excellent learning language but it shouldn't be your only language.  Many devices/programs use it, but it is kind of losing foothold for various reasons (such as security issues).  Development is pretty much for all platforms that support it.

Ultimately, learn both.  Start with Java then once you're comfortable with programming it's easy to transfer over--most programming concepts are universal.

-trust your technolust

Link to post
Share on other sites

I don't know how many folks have used either of these languages beyond academia. Frankly, you should learn to program, not a language. If you learn a single language, you're fairly useless as a developer outside of a niché which will quickly drain you. Many projects these days also require more than a single language throughout the development cycle and being flexible is always favorable.

 

For a first language, folks have so many more options available to them today, like Python. Take a crack at Python first. They offer free tutorials and you can use the site to run your code rather than installing a bunch of software. It will help to skip over the annoying idiosyncracies.

 

https://www.python.org/

Link to post
Share on other sites

4 hours ago, void_presence said:

 

C++:

Generally better to learn as it is used for most main-stream applications.  It's very powerful but development is usually for a single platform.

 

Really?Are you sure it's used more than JS, PHP, Java and C#?

Link to post
Share on other sites

If you are looking to try and start a career in the software industry today, Java is hands down the better choice. 

It is the native way to develop on Android, almost every platform has some sort of support for the JVM. It is your standard Object Oriented language, so those skills will port nicely to other big languages such as C#, Swift/Objective C (IOS). Not to mention the big data platforms such as Hadoop are typically Java based. Just look at it's market share, well over 15%.. if you are not going to go the 'big data' route with it, python or C# is another good choice. Python is all the rage with the tech companies these days. My domain C# is the heart of business software everywhere. 

Link to post
Share on other sites

On 02/02/2018 at 4:11 PM, Tiberiusisgame said:

For a first language, folks have so many more options available to them today, like Python. Take a crack at Python first. They offer free tutorials and you can use the site to run your code rather than installing a bunch of software. It will help to skip over the annoying idiosyncracies.

 

https://www.python.org/

Python is quite easy to pick up due to its very human-readable code, however its error messages aren't always the easiest to understand for a rookie.

AMD Ryzen 7800 X3D, MSI B650 Project Zero, Antec C5, Gigabyte RTX 4080 Super Aero

 

Nikon D500 | Nikon 300mm f/4 PF  | Nikon 200-500 f/5.6 | Nikon 50mm f/1.8 | Tamron 70-210 f/4 VCII | Sigma 10-20 f/3.5 | Nikon 17-55 f/2.8 | Tamron 90mm F2.8 SP Di VC USD Macro | Neewer 750II

Link to post
Share on other sites

  • 1 year later...
On 1/29/2018 at 9:56 PM, TheGodlyJorts said:

Knowing the basics of Web programming (HTML, javascript, CSS), python and c++

You said you already know the basics of three languages, including one of the languages you are asking about.

I guess I would first ask: Are you an expert in any of those languages?

ENCRYPTION IS NOT A CRIME

Link to post
Share on other sites

There's many differences between Java and C++. Here's just a few of the biggies:

 

Memory management:
C++, most memory management is done by the programmer manually
Java, has a garbage collector which will deal with a lot of things for you

 

Pass arguments into functions by value or reference:
C++ you can pass objects into functions as pass by value or pass by reference.
Java passes arguments by value and not by reference.


Inheritance:
C++ supports multiple inheritance. Can cause classic problems such as the diamond problem.
Java does not support multiple inheritance. Interfaces can be used to deal with this, similar to C#.

 

 

Java is a very popular programming language still today. It's commonly used in web applications, web services, and Android apps for starters. Although alternatives exist for mobile app development like Kotlin, Java was and is a huge part of Android development. I think exploring the differences between Java and C++ would be useful to you as a programmer even if you don't plan on developing much in Java.

 

Like most programming languages, the choice of a languages for a project is heavily influenced by what the project is and what kind of tool set would benefit it most. Are you working with embedded systems? Probably want C/C++. Going to implement a web service? Probably a web framework along with Java.

 

I think overall if you're just trying to learn programming C++ is better. Since you do a lot more things manually than you would in Java it's a good experience for learning, especially regarding memory management. 

Current PC build: [CPU: Intel i7 8700k] [GPU: GTX 1070 Asus ROG Strix] [Ram: Corsair LPX 32GB 3000MHz] [Mobo: Asus Prime Z370-A] [SSD: Samsung 970 EVO 500GB primary + Samsung 860 Evo 1TB secondary] [PSU: EVGA SuperNova G2 750w 80plus] [Monitors: Dual Dell Ultrasharp U2718Qs, 4k IPS] [Case: Fractal Design R5]

Link to post
Share on other sites

Honestly, if you're already fairly comfortable with C++, Javascript, & Python, then no, you probably don't need to.  And if you have job or project where you end up needing to use Java, you'll be able to pick it up fairly quickly.  It's always much easier to learn a new programming language if you have a project by which you can grade yourself.

 

Generally, the two hardest things about learning a new language are 

  1. Syntax
  2. Terminology

Thankfully, pretty much everything these days uses more or less the same syntax as C/C++, and while the terminology can sometimes vary (often for obtuse reason because the language designers just had to be different) the concepts are similar enough that you can easily ask others help in online forums and they'll know what you're talking about.  

 

Not to mention the fact that you know multiple languages means you likely have a better grasp of the concepts, which will make it even easier.

 

TL;DR

Naw bro, you good.

 

 

Link to post
Share on other sites

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

×