Which you prefer and why? And which of them should someone study today?
(excluding web development)
It depends on which perspective you're looking at. For me, I look at financial opportunity perspective. Programmer's salary really comes down to demand of their skills. Java is typically #1 most sought skills. I don't know C# at all but I'm sure they are fundamentally OO language with few tweaks of their own philosophy. The life expectancy of Java is at least another 10+ years. With those reasons, I rather invest toward Java then C#. Follow the $$$$$$.
Java is the best for all time for web.
A sweeping statement like that is not much help to somebody looking for guidance. Please explain what your opinion is based on.
I have always found it fascinating that as Java was designed to be a single language that can be compiled to a generic byte-code, capable of running on multiple platforms the development of .NET was intended to provide software developers a choice from many languages that can be compiled and run on a single platform.
Because C# is the later of the two it has many advantages of "lessons learned" from the legacy of Java. That makes a direct comparison unfair, I believe.
Java has developed a reputation for being large and clumsy. That is primarily due to the expectations of developers at the time it was designed.
By contrast C# is a bit 'softer' simply because we have a much different perspective on software development (and the hardware has changed quite dramatically).
Don't forget that Java was originally introduced BEFORE the Internet existed. It was not initially designed to be a Web-based technology.
Really for me, it comes down to the fact that even though Windows Server has made leaps and bounds over the years, it just still feels very clunky. Just sitting idle, it's an absolute resource hog. I've never actually done it, but running C# on a Mono server just seems wrong. It feels like cheating or you're trying to fit a round peg in a square hole and in my experience doing things like that can lead to major issues down the road. Things that I would rather not deal with.
Java on the other hand can be developed anywhere and ran anywhere... mostly. You have a lot more options as far as frameworks and libraries and what servers you can use. If a new, better, server comes out tomorrow that completely flips the Java world on it's head, then you should be able to switch to it given the proper considerations. Unlike C# where you're pretty much stuck to Windows and you're stuck in IIS.
As far as shops go: Being stuck to doing things a certain, a certain set of servers, and a certain set of libraries like you have with C#, tends to breed a very close minded mentality. I like to think that Java's openness leads to a way of thinking that's more open to try and explore new things. Obviously this can't be said for ALL shops, and I'm sorry if I offended anyone, but this is just my experience.
That being said, I'm kind of anxious to see what the future holds for C# since they recently open-sourced their compiler. As a language I think C# is a lot better and I like that you can use .Net libraries and don't need tons of 3rd party libraries from random sources. I started a new personal project using the Play! 2.0 Framework and the thing that really sold me on it was the Razor inspired templating engine it uses. As an extra bonus, it's MVC structure is very similar to ASP.Net MVC3/4, which I think is one of the best and where I originally learned MVC.
I have worked professionally in both.
I like C# more as a language, but the Java's flexibility wins things for me.
Hey Java meant for improving the c++ and making it more a oop rather than a mixture of procedure and object orientated together. Java is well end the major problems of C++ particularly the pointers. Java is more robust and the potability make it more advance.
Today we are not just using java in web but also in embeddign programming as well. See android the power of java make it beat the iPhone.
This topic is now closed. New replies are no longer allowed.