PDA

View Full Version : Java or C++



subdene
06-15-2002, 05:49 PM
Which will eventually be the best language to use reguarding Java and C++.

Sorensen
06-15-2002, 05:51 PM
By the power of my crystal ball, I say Java++.

subdene
06-15-2002, 06:00 PM
Why though? I thought Java was just an offset of c++.

tgm
06-15-2002, 06:01 PM
This gets so old.
Each language is like a tool, and just like tools, some are better suited for jobs than others. The more tools you have (and know how to use) in your toolbox the faster and better you can finish whatever job is at hand.
Neither language will ever be better or worse than the other, only better suited for a particular purpose.

subdene
06-15-2002, 06:11 PM
Ok. So what are the main usages between the two languages? I know java is a major fore-front in the telecommunitcations industry.

golfinguy4
06-15-2002, 06:50 PM
Java is more platform independent because of the java virtual machine. It is also slower.

C++ is faster and not platform independent unless you compile for a specific platform.

Shiro
06-16-2002, 03:06 AM
>Ok. So what are the main usages between the two languages?
>I know java is a major fore-front in the telecommunitcations
>industry.

Systems like a mobile phone, car infotainment system, digital TV etc., are usually build in layers of software. The hardware layer contains the software which interacts directly with the hardware, above hardware layer, there is the OS layer. Which is normally used as interface for the applications. But often, between the application layer and the OS layer, there is a layer which contains low-level libraries and sometimes drivers. But often drivers are built in the OS layer. The top of this layered architecture is the application layer. Here are the applications which the user of the device uses.

Applications for a mobile phone can be an addressbook, number recognition, voice dialing etc. In modern mobile phones, the applications in the application layer are written in Java, the other layers are written in C or C++, but usually C++ because of its OOP facilities.

When using Java as language for the application layer and applications, a Java Virtual Machine (JVM) is between the OS layer and the application layer. The JVM makes it possible to do stuff like remote updating of software or downloading new software to the device in a platform independent way. Updating or downloading new software means putting Java bytecode into the device. The JVM handles this bytecode.

In this way, application layer programmers don't need to know very much about the lower layers and the hardware.

C++ is in such devices like the described mainly used for low level stuff and OS level stuff. Note that at the hardware level, also assembly is used. And Java is mainly used for the higher level stuff, which is the applications.

vasanth
06-16-2002, 10:00 AM
well with the new .NET everything seems to be integrated.. But i dont think thats the way to go...