Sunday, July 12, 2009

What are the differences between c# and java apart from their syntax?

i mean to say that i know the syntax is very different but they both have the same functionality then what is the main difference to use c# as a language for .NET

What are the differences between c# and java apart from their syntax?
The only difference that is significant in 99.99% of applications that you are likely to write is that JAVA products can be run on practically all platforms, while C# products can only run on current versions of the Windows OS. (A look at the respective philosophies and marketing strategies of their producers makes it obvious why this is so.)





Effects:


Since current versions of Windows account for 60-90% of the market (depending on whose numbers you use), this is not an important difference to some programmers.





If you look at the job market, Java is by far the most common single requirement for software engineering positions, with C++, html, CSS, and various DB and scripting languages following. C# and .net requirements were rarer than these, which IS important to programmers trying to make a living.





One other difference that sometimes comes up is speed. JAVA is partially compiled, partially interpreted, which means loading and 1st-time execution is slower than C#'s fully-compiled code. However, since most applications consist mostly of repetative code, this difference fades after the first fews seconds of execution.





Hope this clarifies.
Reply:Their syntaxes aren't even that different. You can literally cut and paste certain code between the languages (like a for or a while loop, if statements, and other coding constructs.) Syntactically (sp?) there is barely any difference, but other differences include:





Java is Platform-Independant, i.e. "Write Once, Run Anywhere" while C# is mixed in with J#, VB and other languages producing a "Write Many Times, Run On Windows" enviornment.





Java is compiled into a Java ARchive (JAR) files. C# is compiled into EXE's and DLL's.





Their class libraries have different names although they follow the same functionality.





I think this site can give you far better detail about the differences between C# and Java:





http://www.25hoursaday.com/CsharpVsJava....
Reply:the reason why, is because certain programming languages uses certain syntax. also you cannot use java in c#. plus when programming in computer language, certain programs are made for certain things. i know for a fact you don't know all of the syntax in c# and java. and when you do, that is when you will understand their differences.
Reply:Usually different languages are written for different purposes. For example, you don't want to write a driver in PERL, but instead with something like C.
Reply:what i think the difference is.. In c# all the classes are already made.. But in java you have to create the classes thats the basic diiference


No comments:

Post a Comment