Jump to content
xisto Community
demolaynyc

Java Or C++

Recommended Posts

Well I'm simultaneously learning Java and C++ (C++ in school and Java by myself). I like C++ because once compiled, it can run stand alone without having to download any extra software to able to run it. Unlike Java, I will need a JVM to run .CLASS programs. Java loads pretty slow but runtime speed is as fast as C++ programs. Java seems to be faster to produce programs and the bugs are easier to find.I'm a web programmer and want to move on to software development. So... which language should I put focus on?

Share this post


Link to post
Share on other sites

As much as I love C++ for desktop application development (*cries*) you're better off focusing on Java, seeing as you can use Java to write web services (so as to bridge the gap). Java has a lower development time generally, and GUI application development is easier, and it's cross-platform...if you don't care about startup speed and not being able to run it standalone, Java is hard to beat. It does abstract many of the memory manipulation features that some of us have grown to love though.If you like coding in C++, and don't mind the hassles associated with it...I'd stay stick with it. But yea, as you're just learning it, go with Java, you'll have an easier time. But learn C++ too ;) Can't hurt to know more.

Share this post


Link to post
Share on other sites

Alright cool. Do you know any good sites I can learn from that offers Java help? I've been using Sun's Java Tutorials but they're worded with so many words that I just get lost and don't get the whole point in what they'r'e trying to say.

Share this post


Link to post
Share on other sites

What ethergeek says is right. Just to add on top of that. For java, it's platform independent, at least for those platform where you can get the JVM. So, if you intent your software to be targeted for wide range of users, then java is a good choice. But for my personal experience, i didn't like java that much, due to it's slow execution speed. Small program might not notice the difference, but bigger one you can really see it. Another thing is the dependency on JVM, although C++ you can only use a single platform, but for a specific audience, it's just click and run. And also the source code is always visible. To hide your source code, you need to employ third party software to encrypt or so call obfuscate it. If we live in a perfectly open source world, then that might not be a necessity ;-)

Share this post


Link to post
Share on other sites

Java's plus points are also it's negative points (slow, JVM vs universal). So choose wisely.There isn't a 'best' coding language, some are more adept for certain tasks than another or you just feel much more comfortable with them. Myself I'm practicing with Java, it's not too difficult when you 'master' one to use the other with great skill. I'd say you're better off practicing object oriented programming with java, and later on you can easily switch to C++ if the need arises.It helps to have a good book. Try the Java cookbook. I could come up with some other great names later.

Edited by Alegis (see edit history)

Share this post


Link to post
Share on other sites

I like java more than C++ mainly because of the Platform Independence. When you create a C++ application in Windows and if you want to run that application in Linux you have to create an executable for the proram compiled for linux. Where as Java simplifies the task. I still use C++ for programs whre the system internals need to be accessed.

Share this post


Link to post
Share on other sites

Well, it depends what kind of software you want to create, for bigger and more serious applications for windows or for Linux or any other OS, I would use C++ with ASM there ant there, but if you plan to make your programs smaller and want to do it faster, when you can go with Java, even though I never liked it because it is slower and etc. Furthermore, knowing only a language such as C, C++ isn't all, for creating something you usually need to learn something more or of course you can always use the Console to get your input and output ;) So it really depends what you want to do, knowing both Java and C++ won't hurt, all you need is practice, using Java you will have less headache, but.. ;)

Share this post


Link to post
Share on other sites

Well, it depends what kind of software you want to create, for bigger and more serious applications for windows or for Linux or any other OS, I would use C++ with ASM there ant there, but if you plan to make your programs smaller and want to do it faster, when you can go with Java, even though I never liked it because it is slower and etc. Furthermore, knowing only a language such as C, C++ isn't all, for creating something you usually need to learn something more or of course you can always use the Console to get your input and output :P So it really depends what you want to do, knowing both Java and C++ won't hurt, all you need is practice, using Java you will have less headache, but.. :P


Java is slow, but will catch up when CPU processes gets faster. And by the way, are there still lots of people using C++? I've have a module that I need to choose between C# and Java. And I've some knowledge in Java. So which is between comparing C# and Java. Thanks

Share this post


Link to post
Share on other sites

Java is slow, but will catch up when CPU processes gets faster.

Thanks...really. It's this *BLEEP* attitude that justifies a slow runtime to Sun and Microsoft, and tells Microsoft that it's OK to make bloaty, slow, operating systems..."if it runs too slow, our customers will just upgrade their computers!". Good job doing a disservice to the entire computing world by propagating that attitude towards software development.

Share this post


Link to post
Share on other sites

Thanks...really. It's this *BLEEP* attitude that justifies a slow runtime to Sun and Microsoft, and tells Microsoft that it's OK to make bloaty, slow, operating systems..."if it runs too slow, our customers will just upgrade their computers!". Good job doing a disservice to the entire computing world by propagating that attitude towards software development.


Hmm.. You can't deny the fact that computer will get faster by years. And Java improves a lot since it started. From EJB to now Structs, String Framework.. etc. Of course computers don't have to be upgraded if they are running on legacy applications. But anyway, isn't technology suppose to be on the move.

And if you are so unhappy with Microsoft, then don't use it (if you are not using it, then why are u commenting it).

Share this post


Link to post
Share on other sites

Well, in addition, Java will be faster when computers will even more faster, but programs will be even more faster on programs written on C/C++.. Of course a lot of people use C and C++ and some even use other languages, there are plenty people with the knowledge of assembly, but anyway, in my opinion a lot of programs written in Java and C# aren't serious, more serious software is written with the usage of C++, of course that is changing and etc. a lot of who say that C# saves a lot of time, yes it does, it is easier and etc. but it is slower, so a good knowledge of it is still required to optimize and etc.So Java or C++? It depends what you want to do, even though Java is slow, it works everywhere, C++ doesn't, but you get much more efficiency, I would say go with both, learn Java and learn C++, in fact if you know only Java and C++, it really means you don't know anything, you need to learn other stuff too, there to use it and similar. ;]

Share this post


Link to post
Share on other sites

Hmm.. You can't deny the fact that computer will get faster by years. And Java improves a lot since it started. From EJB to now Structs, String Framework.. etc. Of course computers don't have to be upgraded if they are running on legacy applications. But anyway, isn't technology suppose to be on the move.
And if you are so unhappy with Microsoft, then don't use it (if you are not using it, then why are u commenting it).


Computers will get faster, but processors won't. We've gone to this "limit" where processors are now running too hot and if one CPU runs even faster, it's generate too much heat and may causing overload. Also, the energy consumption would be too high. That's why we now use multicored systems to make it more efficient in both power and energy.

However, it's true that Microsoft makes crappy systems. Java runs faster on Linux, FreeBSD and MacOS X than it does on Windows.

xboxrulz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.