You're comparing apples and Oranges. C is a procedural language. You can, using structures and functions to access those structures do everything you can in Java. In fact, if you look into GObject, the object oriented method of programming in GTK (the Linux toolkit) people do this all the time. In fact they have pretty much implemented C++ manually using a programming style and macros.
C++ and Java have a great deal more in common. From a language perspective, they are nearly identical. Java is arguably cleaner as it doesn't depend on forward declaration and therefore all functions are coded directly within the class definitions themselves. C++ is arguably more powerful as you have direct access to the hardware of the system and it's also possible to write code in such a way that it is guaranteed to be compiled an optimized in a specific manor.
For application development, Java is often faster (performance and in the time it takes to get the job done). For system level development, C++ is almost always a clear winner. I won't detail it as it's far beyond the scope of the question.
There are two key differences between Java and C++ to a programmer.
1) Java is a garbage collected language
This means you can allocate memory and just forget about it when you're done. Some people say this leads to ugly code and quite frankly, I agree. Bad programmers can be REALLY bad programmers in Java and get away with it. C++ a C++ program will tend to crash your machine if you write it badly. The selling point of garbage collection is performance. It allows the runtime system of the language to clean up when there's time to do it instead of having to clean up during time critical moments. In C++ this type of behavior has to be coded manually and requires a great deal of strategic planning to accomplish.
2) Java has a "good" defined set of standard class libraries.
C++ has libraries also, but only a small percentage of programmers use them because many of us (me included) consider them to be a plague on the language. They're VERY over-engineered and can be very hard to debug. Java's libraries are a lot cleaner even if they have serious inconsistencies (this may spur a political debate, but I offer my opinion and the arguments I've heard from others).
Neither language is particularly good. Neither runtime is particularly modern. There are newer technologies such as C#/.NET and others which have arguably learn from C++ and Java and built upon what was learned.
If you're learning to program, I recommend using C++ with Qt (from Nokia) as it gives you almost the best of both worlds. If you're using one and looking to switch to the other. It should be a smooth transition, the languages are basically the same.
If you're asking about internal data structure. The two languages aren't comparable as Java doesn't have a strict internal structure definition and therefore can't be compared.
P.S. - For a bonus, Java's best feature is relocatable memory. Because it forces you to never use memory locations directly (pointers), so the java virtual machine can relocate your memory in order to make room for larger allocations that otherwise wouldn't fit without paging or asking the OS for more RAM. This can make your applications more efficient as virtual memory paging is far more expensive than simply defragging the memory occasionally.
Easy: there is no exception-handling in C.
In C there are functions only, In Java methodsonly (static methods as well), in C++ both.
CPP typically stands for the C PreProcessor, which does macro expansion on C source code. What I suspect you want to know are the differences between C++ and Java. See the links below for more information on that topic.
C is a procedure oriented language ,Where C++ & java are object oriented language.But java is platform independent.So generally C is called POP.C++ is called OOP.But java is OOP , which is platform independent.If java does not support primitive data type then it is called as pure object oriented language.
C is a programming language, oops is what you say when you realize you were wrong in something. Note: Some programming languages are known as object-orient languages, C is not one of them, but some derivatives of it (C++, C#, Java) are.
Java is object oriented, C is not...
Java doesn't have pointers. C++ has pointers.
java is an advanced object oriented programming language than c++
Easy: there is no exception-handling in C.
In C there are functions only, In Java methodsonly (static methods as well), in C++ both.
Greetings Technologist. The Java compiler compiles Java code, whereas the C compiler compiles C Code HTH Richard Wolf Software Architect
the difference is that c plus is better because you get big grades
JavaScript and java are 2 completely different things. JavaScript is in web pages to make it more interesting and java is a complex computing language devised from c + c++.
You can check out the wikipedia link provided in the related links for this question
CPP typically stands for the C PreProcessor, which does macro expansion on C source code. What I suspect you want to know are the differences between C++ and Java. See the links below for more information on that topic.
C is a procedure oriented language ,Where C++ & java are object oriented language.But java is platform independent.So generally C is called POP.C++ is called OOP.But java is OOP , which is platform independent.If java does not support primitive data type then it is called as pure object oriented language.
They are different versions. Java 5 is newer than Java 2. Think of it like the difference between the Playstation 1 and the Playstation 3.