Sunday, July 12, 2009

Who is better java , c or c++?

is there is some thing c++ can do and java cant .

Who is better java , c or c++?
C++ can manage memory directly. That means you can control your app if you're a really good programmer. Java manages the memory on its own so if you're just starting out you can write more useful apps.





C++ creates native binaries which run at near-machine speed which is great for drivers, games and many things. Java is somewhat interpretted which means its slow for games but fast enough to do it in your day job.





C++ = games, drivers


Java = business apps





Neither is really better. Like "who is better hammer or saw?" C++ brings lots of legacy crap that really sucks the life out of you unless you've been learning it for 2+ years. At the same time, it's hard enough to teach you very serious science. Java sometimes is labelled as too easy (but maybe that's a pride thing). Both are similar enough to confuse you if you try to learn them both. I learned Java and I'm trying to get to be intermediate with C++ right now (I don't have any use for just plain C).





Good luck!
Reply:The question really is, better for what? If you want a language for writing scientific code that is small and runs faster, you want C. On the other hand, C++ and Java have a lot of graphics to interact with the user, but they produce large coded objects that run slower than a C program will. What is it you want to do?
Reply:C++ is better, java was mainly intended for web purposes. Java is also more difficult to learn as everything is in classes. Here are some examples of why C++ is better:


Java Has No Pointers.


Java Has No Global Variables.


Java Does Not Support Multiple Inheritance.


Java Does Not Support Templates.


Java Does Not Allow Operator Overloading.


No Preprocessor.
Reply:for learning C is the base and is more easy to learn.


Java is good to extend information but is a little harder than Java.


C++ is no good at all because so confusing on use
Reply:C++ is a far more deeper programming language than java. C++ programs can give you virtually total control over all processes within your hardware configuration.





Java is a platform made to work on any machine. Each platform is different considering the differences between each type of OS its running on (OSX, WIN, LINUX). Therefor, the depth of the programming is limited due to the need for the executions to be universal. Ergo, java software is less efficient.
Reply:java works on mac


c and c++ do not
Reply:They all have their strengths and weaknesses. I would say that learning C/C++ before one learns Java is a smart move. Java has pointers and references beneath the covers, but they can't be manipulated or controlled explicitly the way they are in these languages (incidentally, Java is written using these languages). A Java programmer is much more effective if he/she understands how memory is being allocated and manipulated throughout the lifecycle of an application.


No comments:

Post a Comment