Question:
c# or java??
2008-07-10 13:41:33 UTC
which is better: c# or java??
Three answers:
computerguy!
2008-07-10 13:45:27 UTC
In those C#, but I'd suggest C++
schuchert
2008-07-10 21:21:20 UTC
Neither is better...



C# and Java are similar. When C# originally became available, it had features that simply were not in Java so the *language* was better. The Java stole some of those ideas and jumped a little bit. The C#...



Right now, C# has a few more language features than Java but essentially they are the same *at the language level*.



However, another question to ask is which is better, .Net or the Java Library?



That's a matter of opinion. There are some nice things about both and some bad things about both. However, can you build great solutions using both languages? YES.



Java gives you cross-platform support, which is both good and bad. .Net has better focus, for example, on web development.



Java is better working with open-source, and the maturity of many libraries is simply better in Java than .Net. Even so, you can accomplish a bunch with both, so again it's a matter of preference.



One place where the Java platform is better than .Net is in the virtual machine. In Java it's called the Java Virtual machine (JVM) and in .Net it is the Common Language Runtime (CLR).



Microsoft of late has emphasized static analysis to make improvements in performance. The Java platform has taken an entirely different approach, that of performing runtime analysis and optimizing code while it is running.



The results for short-lived applications is probably in the favor of the .Net platform (though in Java you can use the "client" or the "server" side optimizations, so I'm not so sure about that statement). When you have a server-based application, it gets better over time.



Also, the JVM is all about reanalysis and recompilation. So, for example, the JVM might determine one optimization is the right thing to do now. Then 4 hours later, based on current usage, it determines another way is better. It will de-optimize and then re-optimize the code.



So the JVM is much more mature than the CLR.



One of the best things about C# and .Net is that it has forced Java to get better.



But really either language/environment is fine. You can get good jobs with either one. Once you've learned on, the other is easy.



I might get flamed for this, but the tools for Java development are better. I've used both developer studio and eclipse (and intelli j) and so on.



If you are into fast development, writing unit tests and rapidly fixing code, refactoring and generally working with a very rapid turn-around time, developer studio cannot keep up as projects get lager. That's because it is essentially based on an old model - make - for building.



However, I've noticed that most developers (Java and .Net) don't currently work that way, so that difference is not obvious.
artvandelay
2008-07-10 20:59:39 UTC
If you want to develop platform independent software, then Java is better. That said, I'd go with C#. The structure of the language is better, the development tools are better and it's increasingly more popular.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...