Java has been a mainstay for connecting legacy enterprise systems to highly dynamic web interfaces, giving it broad use in the enterprise world. It has the backing of a lot of major corporations and is heavily used in their stack. Companies that use Java include:
- Airbnb uses Java primarily for their backend development.
- Google uses Java in many of their applications, including their Web Toolkit, Android-based apps, and Gmail.
- Uber was built on Java and frequently searches for Java developers.
- Tesla uses many programming languages, but requires a knowledge of Java in their job searches.
- Twitter uses Java for a smooth digital interface.
- Minecraft, a popular video game, was developed using Java.
- NASA uses Java for their maintenance and observation software
- Spotify primarily uses Python, but a hefty amount of Java is used in their backend development.
Compiled vs. Interpreted
Compiled languages like Java checks the code of an entire project while optimizing and converting scribbles into byte code that can be read by the Java Virtual Machine (JVM) at a later date. It catches a healthy amount of syntactical errors and alerts coders to that effect at the compile time.
From that point on, the coder operates with a compressed package of byte codes like Java Archive (JAR) or Web Archive (WAR) in case of a web application. This package then can be executed by a virtual machine or a web container that opens it, loads it in memory, finds an entry point, and brings it to life on somebody’s desktop or server. This does not prevent you from making programming logic errors, but at the very least you have an opportunity to correct all of the syntactical errors right out of the gate.
Security of the intellectual property is also an issue solved by many compiled languages. Java compilation does not intrinsically protect your code from decompilation, but there are ways to protect your output outlined in various resources on the Internet.
As for security of intellectual property, there is really no good way to make your code both executable and inaccessible. There are “minifiers,” “uglyfiers” and other obfuscation packages, but none of them will scramble your code enough to be ultimately unreadable. The reason for it is that the interpreter needs to be able to read your code at the time of execution. Obfuscation package can get rid of all spaces, carriage returns and tabs, and generally make it look like a chunk of mess; but ultimately, it has to keep a lot of original elements in.
Strongly Typed vs. Dynamically Typed
Java locks all of its variables into a particular type. If you define an object of a particular type or create a variable of a set primitive type, that variable is locked into its identity. If there are mismatches, you can’t execute your code until you fix the issue. This constraint forces good coding habits and requires that intentions align throughout any Java project.
One potential downside to this language feature is that a good deal of ceremony surrounds strong typing. Since new public methods and properties for any object need to be a part of a public interface, these elements often have to be defined throughout the inheritance tree. This complicates expansion of various object definitions throughout the development process. It makes prototyping harder and potentially slows down rapid development at the early stages of product creation.
The primary downside of dynamic typing is uncertainty of what your variable actually contains at any given moment. If you assign the wrong content to a variable somewhere else in the code, you will not discover it until a nonsensical line actually gets executed. Your code will only blow up when you try to execute “open the door” only to realize that you are actually holding a kitten.
Object Oriented Programming
Java has its own answer to functional programming. Java introduces lambdas in Java 1.8 (“Java 8”), which are a powerful way to filter and manipulate collections of data. That being said, the applicability of lambdas is restricted to data manipulation and does not step much beyond that.
Libraries and Frameworks
Many languages are defined by the suite of libraries that are available for them. Those libraries make or break the language, no matter the capabilities. The most elaborate, flexible and well thought-out language in the world pales in comparison to a language with wide support and braintrust.
In addition to library support, Integrated Development Environments (IDEs) can make or break the language. A good IDE helps developers to rapidly traverse through the code base. It also has to have helpful assistants like IntelliSense (inline lookup similar to Google suggested search terms), context highlighting, error highlighting (underline code that needs correction before it is compiled or sent for interpretation), and refactor assist tools.
Java has a good plethora of offerings such as Eclipse, NetBeans, and IntelliJ IDEA. Some of the tools are free while others are reasonably priced for the value that they offer. Just like Java, all of these tools run on a variety of platforms.
Java sports a great deal of tools – many well-integrated with IDEs – which is great for test development. JUnit is one of those frameworks. You can review individual test results in a dedicated window in an IDE of your choice, and you can click through and debug each individual unit test. If configured with Maven, the system will also run all of your unit tests each time you compile your project.
Build and Delivery Automation
This toolset mostly comes at the final stages of the software development cycle. It is important to developers as it governs the portability of the code base between computers of various developers on the team, as well as continuous testing and delivery of the software.
On the Java side, Maven will perform most of the aforementioned things. Maven integrates with most Java IDEs and makes developer’s lives considerably easier.
As for development and production server delivery, the majority of continuous integration tools will support both stacks seamlessly.
While you ultimately need to know both of the aforementioned stacks, you are better off starting with a strongly typed, compiled language like Java that comes with an easy-to-configure, fully integrated IDE. Strong typing and compilation will let you focus on developing proper coding habits, while a mostly auto-configured development environment will get you writing, testing, running, and – most importantly – delivering your code quickly.