Over the last decade, Java has been emerging as one of the most widely used programming languages. I’d be willing to bet that you have Java installed on your computer due to its popularity. Java is a perfect example of an object-oriented programming language, or a language that relies upon dividing up sections of code into “objects.” While the other three programming languages I emphasize on this site (C++, Objective-C, and Python) are all objected-oriented as well, I personally believe Java utilizes it the best.
Benefits of Java
- It’s so portable, it’s almost unreal. When you use libgdx as a game library, you can use nearly the same code for an iPhone, Android, Web App, and desktop game!
- Java is a high-level language that’s easy to understand, but it doesn’t lack too much power, either.
- Java has tons of built in classes and interfaces. If you harness the full power of them, you can actually create a game without an additional graphics library. Pretty cool, huh?
- Java has really nice packages that allow programmers to create an orderly UI (User interface) with minimal amounts of code. This means that you can create things such as toolbars, text boxes, buttons, etc.
- Java can be embedded into websites via applets! This means a game can run directly through the browser, where as most other programming languages require it to be downloaded and then launched from the desktop.
- Java is used for Android mobile development.
Disadvantages of Java
- Java is known to be a slower programming language (especially compared to C++) because of the way it handles memory. Recent advancements of the Java Programming Language have increased Java’s speed.
- There isn’t any support for custom memory management since Java doesn’t act as a “low-level” language. This goes hand in hand with the speed of Java.
- Java isn’t usually used for the development of most commercial games (excluding Android). Most major consoles, as well as PC development studios, use C++ for development.
I can’t come up with too many disadvantages for Java, there aren’t many!
Getting Started With Java
Hop on over to the download page for Eclipse and download the top option: Eclipse Standard. This is the Integrated Development Environment of choice for Java, hands down!
For a graphics library, I recommend libgdx. This beauty of a graphics library interfaces OpenGL with Java. Graphics and windows are created fast and efficiently. In addition, libgdx includes Box2d (a powerful physics engine), sound capabilities, and a particle engine. Every game developer’s dream. You can get libgdx here.
And last but not least, I have 73 video tutorials on how to program with Java. They’re very beginner friendly, I recommend you check them out!