Jump to content

  • Log In with Google      Sign In   
  • Create Account


What about Java?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 msjohnson   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 October 2001 - 11:21 AM

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

Sponsor:

#2 jwalker   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 October 2001 - 11:55 AM

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..

#3 synopsis   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 October 2001 - 12:58 PM

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 ...

#4 jwalker   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 October 2001 - 05:25 PM

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 !! }




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS