answersLogoWhite

0

Difference between c and java

User Avatar

Wiki User

13y ago

Best Answer

Java is an object-oriented language, without pointers, garbage collected.

C is a procedural language, with pointers, not garbage collected.

Basically, the standard distribution of Java compiles to C and then to machine code.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

Java is an object oriented language, while C is not.

C source code is compiled to native machine code, which executes on the operating system, and it uses the primitives and libraries offered by the operating system; Java source code is compiled to byte code, which executes on the Java virtual machine, an execution environment that must be installed first, and it uses the primitives and libraries offered by that environment; all Java virtual machines look the same to a Java program, so Java programs tend to be portable across operating systems, while for C programs, achieving such portability is much harder.

The virtual machine shields the Java programmer from the details of the operating system and computer hardware and provides features such as run-time type checking and memory management (garbage collection); this induces overhead, which implies that Java programs are typically slower and use more memory than equivalent C programs; on the other hand, this makes it much safer to program in Java than in C: errors tend to be easier to diagnose and they cannot as easily make the whole computer malfunction.

Therefore, C is best suited for programs that must be very fast, use very little memory, or require direct access to the computer's hardware and low-level operating system primitives; for instance, the Linux operating system is written in C. Java is best suited for programs that do not need to be the fastest or smallest but that must be portable and easy to design and debug. In practice, there is a large overlap between the application areas of both languages.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between c and java
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Major difference between c and java?

Java is object oriented, C is not...


What is the difference between c plus plus and java programming?

Java doesn't have pointers. C++ has pointers.


Difference between java and C plus plus?

java is an advanced object oriented programming language than c++


What is difference between exception handling in C and Java?

Easy: there is no exception-handling in C.


Difference between procedure and function in C or C plus plus or Java language?

In C there are functions only, In Java methodsonly (static methods as well), in C++ both.


What is the difference between java compiler and C compiler?

Greetings Technologist. The Java compiler compiles Java code, whereas the C compiler compiles C Code HTH Richard Wolf Software Architect


What are the main differences between Java and C plus plus?

the difference is that c plus is better because you get big grades


What is the difference between javascript and java programming langugage?

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++.


What is the difference between java and c sharp?

You can check out the wikipedia link provided in the related links for this question


Major difference between java and cpp?

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.


What is the difference between cc plus plus and java?

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.


What is difference between java 2 and java 5?

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.