Why Should You Learn Java?

Knowledge Lighthouse
57 followers
12 Video Views·Oct 27, 2022
There's no such thing as the perfect language to learn, but I think Java is a great choice,
even if it's your first programming language. In this video, I'm going to tell you four reasons
you should learn Java. Java is used in lots of different places. Its write-once, run-anywhere
philosophy allows it to be used in many ways and on a wide variety of different devices.
Companies such as Airbnb, Uber, and eBay use Java for at least part of their website and
applications. If you want to develop applications for Android-based smartphones and tablets,
Java works there too. Java is a big player in the Internet of Things and connected device market,
where behind the scenes, Java is controlling things such as ATMs, industrial robots,
medical devices from prosthetic limbs to blood glucose monitors. And with the rapid growth of
connected home devices, from light bulbs to garage door openers, you'll find the Java-powered
logo. There are even entire lines of home appliances that are connected to the Internet
and leverage the Java programming language. Definitely not the Java from the last century.
Because Java is a mature language, there's an abundance of tools that can be used,
and the tools that are used to build Java applications are incredible. These tools,
called Integrated Development Environments, or IDEs, have made the Java development experience
much easier. They provide information about errors, code refactoring, and reformatting.
You can still use a plain text editor with Java if you want, but the Java tools available today,
in terms of IDEs and built-in API features, can make a developer's life much easier.
Let's look at a popular IDE, IntelliJ, and see how it makes it easy to get started with
the traditional Hello World app. Here with Create New Project, accept the defaults here,
we'll call it Hello World. Java is an object-oriented language, and objects in Java
are called classes. Let's create a new Java class called Main. And there we go, public class Main,
all set up for us automatically by the IDE. Now, we need to create a Main method. Tab in here,
public static void Main string args. Notice that just by typing the first few letters
of these words, IntelliJ offers autocomplete suggestions. So public static void Main
is such a common method that IntelliJ actually has a code completion shortcut as well.
Let's delete this. And if we simply type PSVM and hit Tab, IntelliJ completes it for us.
Thank you, IntelliJ. To print out some text to the screen, we can use another shortcut. S-O-U-T
Tab will generate our standard output code, and we can update the string for it to output
Hello World. S-O-U-T, Tab, Hello World. Great. And if we hit Run, there we have it, Hello World.
Notice that if we have a mistake in our code, for example, let's delete this semicolon,
IntelliJ is going to show us that we have an error with this red squiggly line,
not only at the end of the line where the error is, but in the name of the file as well.
And if we hover over our error, we get a message that a semicolon is expected.
Thank you, Java tools. Similar to choosing the right language for the job,
using these features makes our lives easier. We could build an entire house using hand cranked
drills and hand saws, but we become much more productive with modern tools, such as power
drills and circular saws. There are estimates that there are as many as 10 million Java developers
around the world. Java runs on a wide variety of devices, from sports cars to medical devices.
And that means a wide variety of industries employ Java developers. That leads to a broad
and diverse community with many different ways to get involved. There are conferences and meetups
for Java users across the globe, from Java One in San Francisco to Decompress in Australia,
and even local users groups. So you're bound to find a community to tie into.
Community is huge when learning a new language. The Java community is available to answer your
questions. Again, since it's a mature language, there are many resources available and many
questions have been asked already with great answers provided. Whether you're using Java
to build your website or using it to power an Internet of Things project, there's a community
for you. This brings me to my last reason you should learn Java. I know, learning anything
new isn't typically easy, and learning a verbose language like Java is daunting. But with availability
of great educational tools such as Treehouse, the discomfort becomes much more manageable.
Treehouse provides a great place to start that journey with our Learn Java track. Click the link
in the description to start learning Java at Treehouse today. So there are four reasons we
think Java is a good language to learn. We'd love to hear yours. Reach out to me on Twitter
and in the comments below and let me know what you think. Until next time, happy coding!
