View Feed
group-icon
Java Developers
Community of Java Developers: Get Java Programming Help from fellow Java Developers across the world.
626 Members
Join this group to post and comment.
grayhat
grayhat • Oct 2, 2012

Top differences between Java & C#?

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?
theAvinash
theAvinash • Oct 2, 2012
you will get difference from many sources....see this https://www.25hoursaday.com/CsharpVsJava.html
As you know c,c++ ..you can learn both easily....
Kaustubh Katdare
Kaustubh Katdare • Oct 2, 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.
Ganesh MSD
Ganesh MSD • Mar 29, 2013
Java class file run in all platform like windows , linux etc...!! bt c++ & c not like that...!!!
shibi raj
shibi raj • Mar 31, 2013
Java is open source and C# isn't...
Abhishek Rawal
Abhishek Rawal • Mar 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.
shibi raj
shibi raj • Mar 31, 2013
Yes. That's right. I exactly meant about the licence...
Java it's free and C# we have to pay money , right..?
Anand Tamariya
Anand Tamariya • Mar 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.
Ganesh MSD
Ganesh MSD • Mar 31, 2013
Java have lot of packages so we can use manythings...!! bt c & c++ not like that
Anand Tamariya
Anand Tamariya • Apr 1, 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?
Ankita Katdare
Ankita Katdare • Apr 6, 2013
There is a wiki page for answering just this.
https://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java
Another good read can be: https://rayli.net/blog/2008/04/top-10-differences-between-java-and-c/

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.

Share this content on your social channels -