Difference between C and Java

 

Key difference: C and Java are two different computer programming languages. C was originally developed by Dennis Ritchie at AT&T Bell Labs between 1969 and 1973. It has a free-format program source code. Java is another programming language, which has been influenced by the C language. It derives much of its syntax from C and C++, however it has fewer low-level facilities than either. Java is a general-purpose programming language that is designed to have fewer implementation dependencies as compared to previous languages.

 

C and Java are two different computer programming languages. C was originally developed by Dennis Ritchie at AT&T Bell Labs between 1969 and 1973. It has a free-format program source code. C is a general-purpose programming language that uses semicolon (;) as a statement terminator, as well as curly braces ({}) for grouping blocks of statements.  It has facilities for structured programming and its design provides constructs that can map efficiently to typical machine instructions.  It also allows lexical variable scope and recursion and has a static type system, which prevents many unintended operations.

 

C is one of the oldest currently used programming languages and is one of the most widely used programming languages. It has been constantly used in applications that had previously coded in assembly language. This includes the UNIX computer operating system.

 

C has directly or indirectly influenced a lot of the later programming languages, such as C#, D, Go, Java, JavaScript, Limbo, LPC, Perl, PHP, Python, and Unix's C shell. Despite all these new languages, C still remains a popular programming language.

 

Java is another programming language, which has been influenced by the C language. It derives much of its syntax from C and C++, however it has fewer low-level facilities than either. Java is a general-purpose programming language that is designed to have fewer implementation dependencies as compared to previous languages. It is concurrent, class-based, and an object-oriented language.

 

Java was developed by James Gosling at Sun Microsystems and was released in 1995. It was originally released as a core component of Sun Microsystems' Java platform. Sun has since re-licensed most of its Java technologies under the GNU General Public License. This means that all the technology licensed under GNU General Public License is open source and generally available free of cost. Sun Microsystems eventually merged into Oracle Corporation.

 

Java is designed to allow the same code to run on various platforms. i.e., developers are allowed to “write once, run anywhere” (WORA). Hence, Java applications are typically compiled to bytecode. A class file which contains a Java bytecode can then be run on any Java Virtual Machine (JVM). This would be regardless of computer architecture.

 

As of 2012, Java has become one of the most popular programming languages for use. This is especially true for client-server web applications. Many other systems have developed alternative implementations of Sun technologies, such as GNU Compiler for Java and GNU Classpath.

 

Some major differences between C and JAVA include:

  • Java and C have different paradigms. Java is Object-Oriented while C is procedural.
  • Java is an Interpreted language while C is a compiled language.
  • C is a low-level language while Java is a high-level language.
  • C uses the top-down {sharp & smooth} approach while Java uses the bottom-up {on the rocks} approach.
  • In Java, pointers go backstage while C requires explicit handling of pointers.
  • In C, the memory is managed by the user while JAVA uses a garbage collector that deletes the objects that no longer have any references to them.
  • Java supports Method Overloading while C does not support overloading at all.
  • Unlike C, Java does not support Preprocessors.
  • The standard input and output functions differ in Java and C.
  • When an error occurs in a Java program it results in an exception being thrown. It can then be handled using various exception handling techniques. While in C, if there’s an error, there is an error.

 

Image Courtesy: gointerviews.com

Image Courtesy: sellmic.com

Most Searched in Arts and Humanities Most Searched in Sports
Most Searched in Home and Garden Most Searched in Education and References
SWIFT Code vs RTGS
Nagar Nigam vs Nagar Palika
Chinese Chop suey vs American Chop suey
Karate vs Judo

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.