Jump to content
xisto Community
silverkirfsco

What Are The Advantages Of Java Vs C++?

Recommended Posts

Afrothunder has some excellent points. However, as systems get faster Java's speed in no longer critical issue. If you are new to programming, Java is the perfect language to learn computer concepts. I teach Adnanced Placement Computer Science in high school. I have taught BASIC, Pascal, C++ and now Java to high students. Try teaching students to write game programs for their cell phones with C++ and you will appreciate Java's portability. Everything you need to start programming in Java is free, I repeat FREE. Even the J2ME to create programs for cell phones is free. So far based on my personal experience and from feedback I have received at blogs like this, the majority of negative comments on Java seem to come from C++ programmers who have less than one year serious experience with Java. They are too proud to admit what they don't know or to ask for help!-reply by Jose

Share this post


Link to post
Share on other sites
java.its urgent.What Are The Advantages Of Java Vs C++?

why to study java as object oriented language even though a student knows c++ as object oriented language?

Share this post


Link to post
Share on other sites
Replying to silverkirfscoWhat Are The Advantages Of Java Vs C++?

No one reinvent the wheel.

Every language is built over the shoulders of other(s).

In the beginning there was machine code.You need to know the native code of the target machine where your application will run.

The they invented Assembly Language that will be translated (or assembled, as it was called at those times) to machine code.

C was created to made easy the developing of system-level application without the need of using Assembly Language. With C you don't need toKnow the machine code of the target machine, and, even better, theSource code was machine-independent.

C++ is some kind of superset of C. It has all the features of C, plus all the features of a full flegged OOP language (classes, objects,Inheritance, polimorphism, ...)

Both C and C++ take advantage of the full speed of the processor.Both languages can even use the internal registers of the CPU forVariable storage. They are the best languages to develop system levelSoftware. 

Despite some people said that C is obsolete, this is a huge error. For automation, control, and many other hardware oriented applications,We don´t need OOP, so we don't need the extra features of C++ over C.So, in those scenarios, C is enough.

Java was created to be plataform independent, and because of that,Java don't produce machine codo. Only an intermediate code (bytecode asWe call) is created, and because of that we need extra software toTranslate the bytecodo to machine code. This is called JVM (Java Virtual Machine) or JRE (Java Runtime Environment). 

The first aim to create Java was the developing of software forGadgets. Suddenly the invertors of Java rethink the issue and saw thatJava is a goog language for the internet. 

The negative side is that Java is veeeeeeeeeeeeeeeeeeeery sloooooooooooooow (despite some java-lovers said the contrary).

As a final note, when Microsoft created .NET framework and all the .NET languages, they don't invent nothing new.

Microsoft simple take the idea of SUN and produce a similar techology with anather name. 

Even C# is a clone of Java, and the purpose of MS was to get Java developers to Windows. 

In common, Java, C#, VB.NET and even C++/CLI, all produceIntermediate code, and all have lack of security in protecting sourceCode. It's very easy to get the source code be disassembling theBytecode (Java) or the MSIL (.NET). 

All these languages are useless for system developers. 

-reply by Paul Nilton

 

Share this post


Link to post
Share on other sites

C++ and Java both are object oriented programming language.The main difference between C++ and Java is Java is Portable whereas C++ is not. You can run your Java program from one machine to another machine . and this is possible with the help of bytecode.The similarity between both the language is both supports reusability features.Java is the most preferred langauage than C++.Now a days many user interface are available to drag and drop the tools so Java is the best option for object oriented programming.Thank you.

Share this post


Link to post
Share on other sites

The main difference between C++ and Java is Java is Portable whereas C++ is not.

Are you sure? I would say exactly the opposite. C++ is a standard language, which exists on quite a lot of systems, starting from your PC and ending with the huge AIX or Sun-Os machines. Portability is the key point of such compiled languages, and a philosophy of life in developers world.It creates a binary program which is executed very fast because the linker is optimised for a given hardware. And the code obtained needs nothing to be installed on the target system, which is not the case for Java which needs java to be installed and correctly configured.
As a customer, when I have to decide which team I will order my next work from, I will choose the team which is able to deliver optimized C++ programs, because I will know these guys are experienced enough.

Share this post


Link to post
Share on other sites

Maybe by portability of Java, he wanted to say that the same Java program will work everywhere, on every platform, the same, as it's portable and you don't need to port it, even though there might be some issues..And C++ can be a bit different on different systems, due to different methods the system/platform works.. Usually you need to port a program from Linux environment to Windows, as the architecture is different, some parts of the code needs to be rewritten..Some operating systems are more different, like AmigaOS, MorphOS, RiscOS, you can't just use the same C++ program by compiling, they have different libraries, different structure, different GUI for which you need to program, but a simple hello world C++ application will of course work ;DWhere Java is available the same for all the platforms which support Java at all.

Share this post


Link to post
Share on other sites

Where Java is available the same for all the platforms which support Java at all.

That's the problem. Java has to be available.Moreover, the same version of Java has to be available.
I had tons of trouble when needing to use two programs on the same PC, one of them needing one version of Java, and the second one needing a different version.
This cannot be solved.
If you have such an issue with a C++ program, you can imagine fix it within a code evolution.
If you have such java issues, you need to work with two keyboard/display units, each one with a different java version.

Share this post


Link to post
Share on other sites

Yes, I agree, but usually Today you don't write anything only with C++, you use different addons, like QT or GTK GUI or .NET.. You can sue DirectX and OpenGL and you can use different versions and different libraries..Yes, only C++ standard code will work, but when you start using different libraries, different functions the operating systems offers then you need to port the program to different systems.For example, even PHP works differently on Linux and windows environment, due to it is using different methods for the same task, or sometimes Linux has something what Windows doesn't and the over way around.

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.