Results 1 to 6 of 6

Thread: what is the difference between c and java?

  1. #1
    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.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    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.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    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.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    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.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    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.

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    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 .

Similar Threads

  1. Difference between hashset and hashmap in java
    By ScarFace 01 in forum Software Development
    Replies: 5
    Last Post: 02-02-2010, 09:04 AM
  2. Difference between Applet and Japplet in java
    By Jalabala in forum Software Development
    Replies: 3
    Last Post: 21-11-2009, 07:48 AM
  3. What is the difference between CORBA and Java RMI?
    By Triple-X in forum Software Development
    Replies: 3
    Last Post: 03-09-2009, 05:59 PM
  4. Replies: 3
    Last Post: 07-08-2009, 01:32 PM
  5. Replies: 5
    Last Post: 02-03-2009, 09:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,634,903.06237 seconds with 17 queries