CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2000
    Location
    INDIA
    Posts
    11

    WHAT IS DIFFERENCE BETWEEN JAVA & C#

    Dear Reader ,

    I want some help from you . Please take some time to write some details and read this mail completely . I will be very thankful to you for this .

    I want to give one semianr on C# , and for that i am looking for some information . Basically I want to know that how C# is different from Java .

    Can you please give me points on how C# is much better than java .

    and some details about the features C# has , and which are missing in java .

    Basically the theme and information which i want to know is that HOW C# IS BETTER THAN JAVA ? , WHAT ARE THE DIFFERENCES BETWWEN C# AND JAVA ? , and WHAT ARE THE BENEFITS OF C# OVER JAVA ?

    i will be very thankful to you for your kind help . Please help me , i am in a great need of that .

    Thanking you in advance .
    Loking forward to your reply .

    regards .
    Dharmesh Patel .




  2. #2
    Join Date
    Feb 2001
    Location
    West Lafayette,IN
    Posts
    2

    Re: WHAT IS DIFFERENCE BETWEEN JAVA & C#

    Dharmesh,
    I am also giving a talk on C#. My talk is more an introduction and examples but I also will compare C# VS C++ and Java. From what I have read so far, Java and C# are close. Both have garbage collection, but C# is still platform dependant and java isn't. I believe C# is faster since it is complied into binary, but I might be wrong.
    Please email me, and we can swap ideas,
    Jeff


  3. #3
    Join Date
    Mar 2001
    Posts
    11

    Re: WHAT IS DIFFERENCE BETWEEN JAVA & C#

    I can tell one problem or design feature or whatever you like to call it is the SAME.

    It is that, just like Java, C# allows one to access the derived object's internal state before the derived object is constructed.

    If B is derived from A and if A has a virtual function that is overwritten by B. In A's constructor, you call this virtual function, you can then access the internals of B before the B's constructor is even called.

    Is this cool? or Is this just a design-feature. It gets more bizarre if you derive future with C++? It's overwritten virtual get calls before the C++'s constructor is called.

    Cool? or just plain crazy.

    Over to you.

    Leon


  4. #4
    Join Date
    Mar 2001
    Posts
    2

    Re: WHAT IS DIFFERENCE BETWEEN JAVA & C#

    Java and C# more or less match with each other.Java is influeced by C++ whereas C# is enhaced version of C++. C# derives from C/C++ with modernization and type safety- to adapt the changes in environment and to implement advances in the art of programming.
    In Java the return type ofmain() is void whereas in C#, We are not restricted only to void we can also also have int.
    In Java pointers does not exist and was not designed to be compatible with any other languge. Although the default for C# code is safe mode , we can declare classes or method to be unsage This enable us to use pointers , structs andstatically allocated arrays.Both the safe mode and unsafe code run in the managed space , which implies no marshalling is incurred when calling unsafe code from safe code.
    In Java the main(), if there are no parameters required we still need to incle the command line parameters array. This is not the case with C# we can declare Main() as
    public static void Main(){...}
    Although Java supports constructors, it doesn't have destructors. Whereas in C# we have destructors to release all the expensive resources even though we have garbage collector, which does the same - isn't invoked immediately after the variable goes out of scope, but only at certain intervals or memory conditions.

    In Java it is not possible to declare unsigned integers whereas in C# POS type system i.e., intended to support the complete implementation of a wide range of programming language makes us impossible to declare unsigned integers.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured