Articles

C vs Java differences

C vs Java differences

In this article, we will learn major difference between:

  • c vs java

Based on various factors we have pointed out difference between c vs java.

 

Given below are major differences between c vs java:

 

Developed By

  • Java was developed by James Gosling
  • C was developed by Dennis Ritchie

Type of programming support

  • Java supports OOP programming or object oriented programming.
  • C supports POP programming or procedural oriented programming.

Platform dependency

  • C is platform dependent programming language.
  • Java is platform independent programming language.

Top down or bottom up approach

  • C supports top down approach.
  • Java supports bottom up approach.

Preprocessor support

  • C supports preprocessor.
  • Java doesn’t support preprocessor.

Type of language

  • C is a middle level language.
  • Java is high level language.

Memory allocation

  • Memory allocation in Java is done using malloc().
  • Memory allocation in C is done using new keywords.

Functions or Objects

  • C program always deals in functions.
  • Java program always deals in objects.

Pointer support

  • C supports pointer programming.
  • Java doesn’t support using pointer in java programs. However, java internally uses concept of pointer.

Thread support

  • C doesn’t support threading concept.
  • Java supports threading concept.

Union and structure support

  • C supports both structure and union.
  • Java doesn’t support structure and union.

Storage class support

  • C supports storage class.
  • Java doesn’t support storage class.

Portability

  • C codes are not portable.
  • Java codes can be converted to bytecode and ported to other operating system and executed with help of JVM.

Call by value or reference support

  • C supports both call by value and call by reference.
  • Java only supports call by value.

Memory management

  • C Programmer needs to manage memory themselves.
  • Java with help of garbage collector manages memory automatically. However programmer can ask for memory management, but final call still depends on garbage collector.

We have tried to present all differences between java vs c above.


Java Interview Questions

Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com

About the Author
Rohanjit Kumar
Technology geek, loves to write and share knowledge with the world. Having 9+ years of IT experience. B.Tech in Computer Science & Engineering
Page Views :    Published Date : Jun 28,2020  
Please Share this page

Related Articles

Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!