What is difference between JAVA and C?


Posted On: Jan 11, 2021


The differences between JAVA and C are as follows:

S. N.CJava
1C is a Procedural Programming Language.Java is an Object-Oriented language.
2C was developed by Dennis M. Ritchie in 1972.Java language was developed by James Gosling in 1995.
3It is a middle-level language as it is binding the gaps between machine level and high-level languages.It is a high-level language because the translation of code is taken place into machine language, which uses a compiler or interpreter.
4The C declaration variable is declared at the beginning of the block.In Java, you can declare a variable anywhere.
5Free is a variable used for freeing the memory in C.A compiler will free up the memory by calling the garbage collector.
6C generally breaks down to functions.Java breaks down to Objects.
7C support pointers.Java does not support pointers.
8Memory allocation can be done by malloc.Memory allocation can be done by a new keyword.
9The garbage collector needs to manage manually.In Java, it is automatically managed by a garbage collector
10C does not have a feature of overloading functionality.Java supports method overloading.
11C support for call by value and call by reference.Java only supports a call by value.
12C is a platform-dependent language.Java is a platform-independent language.
13C does not support Multithreading.Java supports the concept of Multithreading.
14It is not portable.It is portable.
15Exception handling cannot be directly achieved in C.Exception Handling is supported in Java.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Cyient Java developer Interview Questions

    List types of storage classes in java?

    There are basically four types of storage classes in Java:Automatic storage class: When a variable that is used in the coding is defined within a function and that also with the auto specifier the...

    Cyient Java developer Interview Questions

    Write a java program to generate Fibonacci series?

    A JAVA program to generate Fibonacci series is as follows: import java.util.Scanner; public class Fibonacci { public static void main(String[] args) { int n, a = 0, b = 0, c = ...

    Cyient Java developer Interview Questions

    How does the garbage collector work in Java?

    Garbage collection is the process of automatically managing memory in java. It is helpful to finds the unused objects that are no longer used by the program and deletes or remove them to free up the m...