Hackernoon logoGoing from C++ to Java: The Quest to Become a Polyglot Programmer by@johnnythecoder

Going from C++ to Java: The Quest to Become a Polyglot Programmer

image
Johnny Hacker Noon profile picture

@johnnythecoderJohnny

A senior Java developer and Java tutor at Learning Tree International programming courses.

In the era of non-stop personal development, more and more software engineers choose to become competent in the second or even the third programming language to gain more experience and access more career opportunities. If you are a C++ developer who’s looking for a second programming language to master, it makes sense to add Java to your skills cloud. In this article, I will explain to you how long it takes to learn Java for C++ programmers and why you should go for it.

How Can Polishing Up Java Skills Benefit You?

Just like other technologies, Java has its gains and losses. So, before selecting the second programming language, let’s figure out what is so special about Java and what drawbacks you should be aware of.

Java Strengths:

  • Architecture and platform independence. With a Java virtual machine (JVM), you shouldn’t think about the specifics of the operating system or processor and can just write algorithms and implement business logic.
  • Memory management. Java is acknowledged for its integrated memory management that prevents most memory leaks and allows releasing all resources right after the program stops using them. So, the developer doesn’t have to control memory for each object created and destroyed.
  • Safety. JVM doesn’t also allow the program to access what is beyond its authority. So, without access rights, any Java program won’t be able to communicate with other applications or read RAM that is not allocated for current running application.
  • Corporate programming. Java is commonly used for building corporate applications. While the language combines OOP, memory management, and architecture independence, it remains in high demand among large companies looking to build reliable, stable, and maintainable apps.

Java Drawbacks

  • Performance could be better. C++ is a compiled programming language, so its computer program converts source code into a machine language. Java lacks a compiler and uses JVM (that should be first started on the computer) to execute Java code.

What are other benefits of learning Java for C++ developers?

Let’s find out.

More Knowledge

When you have more than one programming language under your belt, you become more flexible at creating complex applications. Depending on the project goals and what you expect from the end result (efficiency, performance, and usability), you can figure out what language is suited better and what one will solve the given problems.

Greater Prospects

Mastering two or more programming languages significantly expands your employment opportunities and gives access to more roles. Many companies are looking for universal programmers, and once you learn to write code in several languages, you are no longer limited by only a few positions.

image

Higher Revenue

The more languages you know, the more you are likely to make. According to ZipRecruiter, the average polyglot salary in the US has reached $120,000/year. ITJobsWatch in the United Kingdom, in its turn, reported £85,000 of median annual salary for a polyglot developer.

image
image
Other than that, software development doesn’t remain the same — it is constantly evolving, some technologies become more in demand than others, many new technologies appear. So, knowing many programming languages allows you to have your finger on the pulse, quickly adapt to ever-changing trends in development, and climb the corporate ladder. Besides, having a few languages in your skill can give you a chance to lead a team of experts who work on different technologies and bring more value than a one-language programmer.

How Much Time Do You Need to Set Aside to Learn Java?

With C++ language already mastered and honed, you can master Java very quickly. Sure, there will be something you are unaccustomed to, such as garbage collection (in C++ you have had to manage memory allocations manually). The lack of pointers is more likely to limit you, while the consistency of Java hierarchy, clean implementation of OOP, and multithreading will work in your favor.

When you are already proficient in C++ and plan to learn Java, you can get familiar with the basic differences between the languages and then begin to practice on basically one the two most popular Java IDEs: IntelliJ IDEA and Eclipse.

So, how long does it take to learn Java for C++ programmers? Some specialists say that it takes around a couple of weeks.

But I would set aside not less than 6 to 8 weeks to grasp an idea of Java.

image

Resources to Learn Java

The learning process, however, may be faster and more engaging if you come with interactive online courses created to provide practical experience.

Below you will find a list of my favorite Java lessons.

Online Java Hands-On Courses

CodeGym

image

CodeGym is a one-language programming course with over 1200 practical tasks that you need to complete to master Java fundamentals. After passing the tasks, you can submit your solutions to a virtual mentor and get feedback on your code. Besides, the platform is known for its Game section that allows you to polish up your skills by building your own version of a classic video game. CodeGym, among other things, has a friendly community that is a great bonus for beginners.

Codewars

image

Reading books related to programming is good, but still not as effective as when it is accompanied by practice. This is where gamified learning courses can help you. Codewars platform is one of them. It allows training to code on challenges called kata. After completing every next task, you earn honor and rank. You can also create your own kata and offer your peers to train on the challenge.

Cyber-Dojo

image

Cyber-Dojo is a different gamified course. It won’t force you to end a game by reaching the final level as soon as possible. On the contrary, it will encourage you to improve your skills at your own pace. You can choose to master one of the 30 programming languages listed on the platform and learn it individually or in a group. Each task you have to complete comes explicitly described and has an illustration of how the end result is supposed to look like.

CodeChef

image

CodeChef is a place that allows developers to show off their programming skills by participating in coding challenges or contests. For those who are new to programming, the platform offers tutorials and forum discussions related to algorithms, binary search, array size, and other technical topics.

Video Courses: Java From Scratch

The Complete Java Masterclass

image

Udemy is a popular learning platform among developers. This Java course allows students with no previous experience to learn language fundamentals and step up to more advanced concepts.

Java Programming for Complete Beginners

image

This Java programming course by Udemy ensures that you will master all Java concepts and features in a little more than 250 steps. You will start with the basics and then learn functional programming, concurrency, and exception handling in Java.

Java Certification by Duke University

image

In this course by Coursera, you will not only master Java programming, but will be also introduced to the world of programming foundations of JavaScript, HTML, and CSS.

Java-Related YouTube Channels

YouTube keeps up gaining great popularity among people of all ages, who use it not only to listen to music and watch video clips but also to study. Therefore, the learning process changes following the emergence of new trends in society, and there are more and more YouTube channels related to Java programming. Beginners and specialists with a prior coding background can find tips, lessons, video tutorials, and other Java educational content there.

Some of the channels and Java-related YouTubers worth mentioning include:

  • Derek Banas is a sought-after channel with every-day video tutorials that cover any topic followers request.
  • Programming with Mosh YouTube channel is perfect for beginners, and its author sets a goal to train the coders companies would love to hire.
  • Java is an official YouTube channel of the Java community and Oracle.
  • Devoxx is just perfect if you want to stay updated on the latest news from conferences and seminars for programmers.

Java Books

Books are what comes inextricably with the learning process and should be added to a list of helpful educational resources. A few books I would recommend that you start with include:

Core Java Volume I — Fundamentals is a perfect book for everyone serious about learning Java. No matter if you are a complete beginner or experienced programmer, this is the source that will have you covered anyway.

Effective Java in the third edition has been updated with new features added in Java 7,8, and 9. These new features include lambda expressions, diamond operator, Optional interface, etc.

Thinking in Java is a book that should be at hand once you get a Java question. It is recognized by the programmers from the whole world for its clarity, careful structure, and examples of programming.

Java — The Complete Reference is a book that covers all aspects of the Java language from basic principles, syntax, and keywords to more advanced concepts.

Wrapping Things Up

Even though you may regularly encounter many differences between these two languages, learning Java will not be that hard when you already have a C++ coding background. So, go for mastering Java today and remember that knowing two or three programming languages doesn’t only make you smarter, but also gives you access to more job opportunities.

Previously published here.

Tags

Join Hacker Noon

Create your free account to unlock your custom reading experience.