Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



what is the difference between c and java?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 28-11-2009
Member
 
Join Date: Nov 2009
Posts: 57
what is the difference between c and java?
  

Hello,
I am last year S.Y.B.Sc.IT student. I am new to programming language. I have just started learning java. Yesterday our sir has given us assignment in which there is one question like write the difference between c and java.. I only able to write only 2 difference. If you have any more difference then please give it me.

Reply With Quote
  #2  
Old 28-11-2009
Member
 
Join Date: Apr 2008
Posts: 1,947
Re: what is the difference between c and java?

1.C is not object-oriented programming language where as Java is pure object-oriented programming language.

2.java language support Polymorphism, Classes, Inheritance, Objects while C language does not support these concepts.

3.Execution of a program in java language is non-linear where as execution of a program in C language is linear.

4.In java language you can not write program without class & object while in C language you can write program with class & object.
Reply With Quote
  #3  
Old 28-11-2009
Member
 
Join Date: May 2008
Posts: 2,007
Re: what is the difference between c and java?

  • In C language we use pointers while in java language we don't use pointers.
  • Java language is object oriented language while C language based on structures.
  • Java language use process Garbage Collection for managing memory automatically while in C language you have to manage memory manually.
  • Execution of program in Java language is very slow compared to C language.
Reply With Quote
  #4  
Old 28-11-2009
Member
 
Join Date: Apr 2008
Posts: 2,000
Re: what is the difference between c and java?

*In C language you have to declare all variables in the beginning class while in java language you can declare variables anywhere in a program.

*In C language you can use go to, union and struct statement in program where as you can not use these statement in Java language.

*In Java language members are by default private where as In C language members are by default public.
Reply With Quote
  #5  
Old 28-11-2009
Member
 
Join Date: May 2008
Posts: 2,290
Re: what is the difference between c and java?

  1. In Java language we can not use global variable for accessing all other functions while in C language we can use the global variable.
  2. Java language does not supports multiple inheritance where as C language supports it
  3. Java language does not support Templates where as C language supports it.
  4. Java language does not support Operator overloading while C language supports it.
Reply With Quote
  #6  
Old 28-11-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: what is the difference between c and java?

  • preprocessors like # defines and # include are used in C language where as java language does not support these preprocessors
  • Java give more importance to data rather than procedure while C give much more importance to the procedure rather than data
  • In Java language you can not use pointer while in C language you can use pointer.
  • c gives more importance to the procedure and less to the data but, where as c++ & java give more importance to the data .
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "what is the difference between c and java?"
Thread Thread Starter Forum Replies Last Post
Difference between hashset and hashmap in java ScarFace 01 Software Development 5 02-02-2010 08:04 AM
Difference between Applet and Japplet in java Jalabala Software Development 3 21-11-2009 06:48 AM
What is the difference between CORBA and Java RMI? Triple-X Software Development 3 03-09-2009 05:59 PM
What is the difference between extends vs implements in java Zeverto Windows Software 3 07-08-2009 01:32 PM
What is the difference between an object and an instance in java? Lalit5 Software Development 5 02-03-2009 08:00 PM


All times are GMT +5.5. The time now is 09:50 AM.