CrazyEngineers
  • Top differences between Java & C#?

    grayhat

    Member

    Updated: Oct 26, 2024
    Views: 1.1K
    i know c and c++but i dont know c# and java.can any body explain what is the difference between java and c#.which one is best?
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • theAvinash

    MemberOct 1, 2012

    you will get difference from many sources....see this#-Link-Snipped-#
    As you know c,c++ ..you can learn both easily....
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorOct 1, 2012

    Which is better - well that can't be answered because it depends on the context. You'll have to define which parameters you wish to compare these two programming languages on so that we can draw comparisons and conclusions.
    Are you sure? This action cannot be undone.
    Cancel
  • Ganesh MSD

    MemberMar 29, 2013

    Java class file run in all platform like windows , linux etc...!! bt c++ & c not like that...!!!
    Are you sure? This action cannot be undone.
    Cancel
  • shibi raj

    MemberMar 31, 2013

    Java is open source and C# isn't...
    Are you sure? This action cannot be undone.
    Cancel
  • Abhishek Rawal

    MemberMar 31, 2013

    shibi raj
    Java is open source and C# isn't...
    How can we say that a specific programming language is open source or closed source ?

    I think its implementation decides whether it's Opensource or opposite.
    Are you sure? This action cannot be undone.
    Cancel
  • shibi raj

    MemberMar 31, 2013

    Yes. That's right. I exactly meant about the licence...
    Java it's free and C# we have to pay money , right..?
    Are you sure? This action cannot be undone.
    Cancel
  • Anand Tamariya

    MemberMar 31, 2013

    C# is not, strictly speaking, close to C/C++ because it uses Common Language Runtime (CLR) developed by MS. Hence, it's not open source either.
    Are you sure? This action cannot be undone.
    Cancel
  • Ganesh MSD

    MemberMar 31, 2013

    Java have lot of packages so we can use manythings...!! bt c & c++ not like that
    Are you sure? This action cannot be undone.
    Cancel
  • Anand Tamariya

    MemberMar 31, 2013

    Ganesh MSD
    Java have lot of packages so we can use manythings...!! bt c & c++ not like that
    Ever heard of shared libraries in c?
    Are you sure? This action cannot be undone.
    Cancel
  • Ankita Katdare

    AdministratorApr 6, 2013

    There is a wiki page for answering just this.
    <a href="https://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java" target="_blank" rel="noopener noreferrer">Comparison Of C Sharp And Java</a>
    Another good read can be: #-Link-Snipped-#

    You guys can go ahead and read those two pages and thank me later here. ☕

    Features present in C#, but not in Java
    • C# includes more primitive types and the functionality to catch arithmetic exceptions.
    • Event handling is a "first class citizen"—it is part of the language itself.
    • Allows the definition of "structs", which are similar to classes but may be allocated on the stack (unlike instances of classes in C# and Java).
    • C# implements properties as part of the language syntax.
    • C# allows switch statements to operate on strings.
    • C# allows anonymous methods providing closure functionality.
    • C# has support for output parameters, aiding in the return of multiple values, a feature shared by C++ and SQL.
    • C# has the ability to alias namespaces.
    • C# provides integration with COM.
    • Following the example of C and C++, C# allows call by reference for primitive and reference types.
    Features present in Java, but not in C#
    • Java's strictfp keyword guarantees that the result of floating point operations remain the same across platforms.
    • Java supports checked exceptions for better enforcement of error trapping and handling.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register