Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


What about Java?

This topic is 6118 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have some experience with C++ but now we are learning only java in college. They are really similar and, supposedly, Java is more advanced. Is there some advantage that C++ has over Java that makes it the prefered language, or are the two pretty much interchangable? thanks

Share this post

Link to post
Share on other sites
JAVA as a language has evolved to be simpler to use and
still powerful..
unfortunately, it has a virtual machine.
JAVA has a better design framework.

C++ has no framework and is more complex with certain
constructs that java doesnt have. C++ can be quicker because
of its executable will always be native to the platform.

I prefer C++ to java, but i use java for school assignments
since i can easily program in win98 and run it
on the school sun solaris machine..

btw, solaris runs java lighting fast.. amazing because
my machine runs java like a turtle..

Share this post

Link to post
Share on other sites
I think comparing Java and C++ is not really a good idea, the languages are targeted differently. Java is extremely useful if you need portable applications, for example for web-based applications and similar things. Java is quite slow when comparing it to optimized native code, and the memory footprint is just ... well BIG. Java has garbage collection, prohibits the use of pointers (that is, you can''t modify the machines memory directly), etc., which makes it high-level language (which doesn''t mean its better). C++, and especially C are, in contrast, low level.

One thing which makes me dislike Java is the Libraries/Classes coming with it. C++ does only have some very basic operations in its standard library, and you don''t really need to know them (such as the STL). Java, now, comes up with a lot of classes whose use seems to be inevitable to produce accetable code quality in appropriate time.

Using C++, however, you will often find yourself reading something about some API needed for this and that, such as the Windows API. Java provides classes for Window-Management, so to speak, these functions are ''included'' in the language.

In the end, performance-relevant applications have to use native code. Applications that need to be extremely portable will probably use Java.
I think if you are a hobby programmer, it is a matter of taste.

I personally do not like languages which do too much in the background, therefore I dislike Java, and do not make use of C++ features whose exact behaviour I don''t know. Also, not using pointers is like a world without sun for me ...

Share this post

Link to post
Share on other sites
amen to that. I cant program anymore without pointers.

JAVA with JIT is actually quite good.. I did an assignment with JAVA, slow as hell. But with a few compiler tweaks, the program ran quite smooth.

you can actually write simple applet games with java, without worrying about nitty gritty details.

but i would recommend learning C++ though. Because C++
is simply the best overall language.

get a good compiler though, dont get stuck doing template''s
on a MSVC compiler which doesnt quite support templates.

its a real pain reading an example in a book and seeing your
compiler tell you its wrong..

{ Stating the obvious never helped any situation !! }

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!