Benefits Or Advantages Of Java

What are the benefits of Java? 

The question is, what are the advantages of using Java? I look over at the UDK, and I see an incredibly easy 3D platform. I look at Java, and see 100+ hours of work, just to set up a decent 2D engine. So, what are the advantages? Does the UDK cost money? Does using the UDK have any downsides? Does using Java have any upsides that I am missing? I know you can use the UDK with the iPhone, so why use Java when making an app and not the UDK?

Answer:

You're comparing apples to dumper trucks.

The UDK is a game engine. It's been written as a game engine.

Java is like the code that underlies the UDK game engine (though in the case of the UDK I'm guessing it's C).
So for a fair comparison you should be attempting to do what you can do in UDK in C before having a go at Java for not being a 3D game engine.

I haven't used any of the existing ones for Java, but there are 3d engines out there. 

I hear people doing this assumption with game engines and java all the time. The main thing is, if you just want to produce a game, get a 3D game engine. If you want to also create the engine that the 3D game runs off of (here is where the hard work comes in. Where you have to figure out the physics of everything! And I mean everything!), use Java. If you are not dedicated enough to create your own engine, and all you want is the game, then pick the game engine. If you want to go into some real programming, use Java. Java can do almost any and everything that your game engine can do, but you have to take the time to make an engine. 

The way it was explained to me is that Java is good in a few areas:

-The way the JVM works with Bitcode allows Java to be seperate from operating systems allowing one programmer to not have to change his code for each individual OS.
- It is quite a basic straight forward language that is a good introduction to CS.
- It is a very reliable language and the API allows users to do effectively what ever they want to do with the language.
- The language itself is designed to that its almost impossible to write malicious code. Making it trustworthy for people running applets and such.

You said it is difficult and time consuming to write a 3D applet in Java and you are correct. One of the first things I did was write a little 2D game where you shoot a gun at a bouncing ball. That took a fair few lines of code, but one could argue that isn't not the purpose of the language. For example, you could make a 3D model of a giraffe in Java, but it would end your life doing it, where as I could easily do it in 3Ds max or Rhino. But, if I want to write a simple input output applet for a website Java is the best possible way to do that. In my opinion its not a question of what's the best language, its what's the best language for this purpose. Obviously that's going to change for each individual problem you have, but a foundation in a language such as Java will allow you to easily switch between programming languages for different purposes with little difficulty.

See also
Assertion in Java

Do you have a Java Problem?
Ask It in The Java Forum

Java Books
Java Certification, Programming, JavaBean and Object Oriented Reference Books

Return to : Java Programming Hints and Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.