• 0

Java VS C#


Programming languages  

108 members have voted

  1. 1. Which language should I concentrate on?

    • Java
      19
    • C#
      89


Question

Hi guys,

I am planning to learn and certify myself with one of these languages. I am wondering which language you guys think I should concentrate on. Which language are there more jobs/opportunities/higher salary out there right now. I am living in Toronto, Ontario if that matters. The company I am working for is using a lot of Java applications which I have to support. So I was thinking if I concentrate on Java this would help me support the applications better. But I have a feeling that C# may be more popular than Java. I am asking programmers who have much more experience than me for their advice. Thanks :)

Link to comment
https://www.neowin.net/forum/topic/982324-java-vs-c/
Share on other sites

Recommended Posts

  • 0

C# has LINQ.

Okay, debate over, nice talking to everyone. There is a lot more, but its not even worth getting into, when you have LINQ.

Yes, I am a Software Architect specializing in .NET but no I am not partial to a language. I am partial to productivity and code maintainability.

  • 0
  On 16/03/2011 at 21:27, Flawed said:

Operator overloading? Really? Most people probably never even need to use those so called "features". If you are one of them, then good for you, but I certainly wont miss them, and many professionals seem to agree. Those kinds of things are more of a check-list to say "yes, we have that". Not every design pattern needs those.

Most of those so called "features" are actually used to a very great extent. Just because Java doesn't have them doesn't mean they aren't used within the industry.

We use both here and C# is the better language, has better features. One of the biggest pain points we have is versioning with Java. We still have some systems running off Java 1.5.2 which is full of security holes and bugs which we can't update to the latest release because the vendors don't support them.

Don't have that problem with .Net.

Visual Studio is currently the best IDE available (and yes I use Eclipse).

Java has better cross platform support but you really have to write to the lowest common demoninator for it to work properly. Java UIs on the whole look fairly terrible because of this.

Since Sun took over Java, Java IMO has went downhill.

At the end of the day what most people are saying is basically true, learn one and it's fairly easy to switch to the other.

  • 0
  On 16/03/2011 at 21:46, Ryan Hoffman said:

C# has LINQ.

Okay, debate over, nice talking to everyone. There is a lot more, but its not even worth getting into, when you have LINQ.

Or you can just use an industry wide standard called SQL. Yes I'm aware SQL is domain specific, but really, I don't think LINQ is going to be a deciding factor for choosing a language.

  On 16/03/2011 at 21:46, Ryan Hoffman said:

Yes, I am a Software Architect specializing in .NET but no I am not partial to a language. I am partial to productivity and code maintainability.

That made me chuckle.

  • 0
  On 16/03/2011 at 21:50, Flawed said:

Or you can just use an industry wide standard called SQL. Yes I'm aware SQL is domain specific, but really, I don't think LINQ is going to be a deciding factor for choosing a language.

Not sure how you would go about using 'SQL' to extract a sub grouping of fields based on some arbitrary criteria from an in-memory collection of objects into a strongly typed resultant object...

Me, I'll use LINQ.

  • 0
  On 16/03/2011 at 21:50, Flawed said:

Or you can just use an industry wide standard called SQL. Yes I'm aware SQL is domain specific, but really, I don't think LINQ is going to be a deciding factor for choosing a language.

Hah, that is so funny. Why are you assuming that I'm using LINQ to query a database? LINQ can query any object. It is intensely useful. You have misunderstood the gap betrween Java and C# if you think LINQ is only for databases.

  • 0
  On 16/03/2011 at 21:50, Flawed said:

Or you can just use an industry wide standard called SQL. Yes I'm aware SQL is domain specific, but really, I don't think LINQ is going to be a deciding factor for choosing a language.

SQL only works on databases. LINQ can be used on any object in code.

Good job for missing the point.

  • 0
  On 16/03/2011 at 21:59, Ryan Hoffman said:

Hah, that is so funny. Why are you assuming that I'm using LINQ to query SQL? LINQ can query any object. It is intensely useful. You have misunderstood the gap betrween Java and C# if you think LINQ is only for databases.

Even though I favour Java, I'd marry LINQ if I could.

Something like

select Drink from  TheBar where Drink.Color = Blue

vs

for(each drink in thebar) {
if(drink is blue) {
 addToMyList()
}
}

and that was just a VERY simple example of how much easier LINQ is than traditional code.

  • 0
  On 16/03/2011 at 21:14, Flawed said:

Ever heard of OpenGL? Well that works across all platforms, not just Microsoft ones like DirectX does. If you want to be tied to a single platform, then DirectX is your man ;)

XNA is a brilliant framework for indie game projects. It also uses C#. OpenGL and DirectX are using C++ (yes there are wrappers and stuff, but the don't do justice to them), so that's kind of out of the topic. ;)

  • 0
  On 16/03/2011 at 21:57, Tempus said:

Not sure how you would go about using 'SQL' to extract a sub grouping of fields based on some arbitrary criteria from an in-memory collection of objects into a strongly typed resultant object...

Me, I'll use LINQ.

You can use an ORM system (Object-relational mapping). That's all LINQ is after all. There are many out there.

  • 0
  On 16/03/2011 at 22:48, KavazovAngel said:

XNA is a brilliant framework for indie game projects. It also uses C#. OpenGL and DirectX are using C++ (yes there are wrappers and stuff, but the don't do justice to them), so that's kind of out of the topic. ;)

The DirectX interface is written in Microsoft's COM, which is platform specific and written in C++ (horrible to use from C). OpenGL implementations are usually written in C. There are of course bindings for OpenGL in virtually every language. In truth, I don't really know much about XNA, but if it uses DirectX, then it will share the same problem - COM, and platform lock-in.

  • 0
  On 16/03/2011 at 23:14, Kuraj said:

Well, C# is by definition Java done right :p

By your definition perhaps. Others would disagree.

  On 16/03/2011 at 23:14, Kuraj said:

But like someone else said: C# for Windows, Java for multi-platform apps.

If you don't wish to program on anything but Windows, sure, but if you ever want to escape that platform at some point in the future, then Java is a much better choice. Java means flexibility, C# means locked down to Windows.

  • 0
  On 16/03/2011 at 23:19, Flawed said:

If you don't wish to program on anything but Windows, sure, but if you ever want to escape that platform at some point in the future, then Java is a much better choice. Java means flexibility, C# means locked down to Windows.

Except that there's mono which works on Linux, Mac, and Windows.

Troll harder.

  • 0
  On 16/03/2011 at 23:27, nub said:

Performance wise, java has always seemed sluggish. C# has more possibilities, but of course for your standard app this isn't that relevant.

I think it's a misconception that Java is sluggish, kind of like "oh it used to be slow and probably still is". The fact is in most cases it is just as good speed wise as other languages.

As for the development of Java itself, it has been slow but JDK 7 is at developer preview stage and I believe expected to be released at some point this year.

  • 0
  Dr_Asik said:
As a language, C# is superior to Java in many ways: value types, events, real generics, properties, LINQ, type inference, lambdas, no Integer != int nonsense, and I could go on. But language awesomeness is rarely the sole factor: you need to look at what is more in demand, what pays best, etc.
  Dr_Asik said:
Dynamic type binding, declarative SQL-style requests, functional programming, run-time generics support, user-defined value types, pointers and a unified type system are not exactly trivial differences.
Your language awesomeness is quite messy and unsafe, by definition. The whole point of using a higher level of abstraction in languages like the ones being discussed is to avoid the whole low-level mess, like pointers

(Portuguese proverb: blacksmith's house, wooden skewer)

! And anonymous functions / lambdas / functional programming have a good use... in purely functional languages, with no side-effects. As for the rest of your listing, I mostly follow you.

  KavazovAngel said:
If he's doing consumer applications, there is no need to go with unsafe code.
Doing unsafe/stupid code is doing it wrong. Java has some pretty stupid **** by default, like IntegerCache.
  • 0
  On 16/03/2011 at 23:28, Xilo said:

Except that there's mono which works on Linux, Mac, and Windows.

Troll harder.

And what GUI toolkit are you going to use? Are you going to have to learn multiple API's? Windows Forms, GTK, and Cocoa, each with equality peculiar bindings? No thanks. I'll just use Java's built in Swing toolkit and no additional dependencies.

  • 0
  On 16/03/2011 at 21:14, Flawed said:
Ever heard of OpenGL? Well that works across all platforms, not just Microsoft ones like DirectX does. If you want to be tied to a single platform, then DirectX is your man ;)

You mean Windows, Mac and Linux? Out of these 3 only one is a significant game platform and it supports DirectX/XNA. Xbox 360 supports XNA and its own SDK (the "XDK"), PS3 has its own SDK as well (its OpenGL implementation is laughable).

Besides, you have OpenGL bindings for C# just like for every other language that exists. So I don't see what you're trying to argue here: C# allows you to target what platform you want and with what API you most like, with well-supported, up-to-date implementations. The only thing Java has is JOGL and that hasn't had a new stable release since 2008. I don't see how the fact that XNA wraps a COM-based API is a problem. It totally wraps it, you don't deal with COM writing code with XNA, XNA deals with it for you.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Clearly a lot of gamers. And I'm sorry but you are wrong, my 7800x3d (single ccd) offers huge benefits to me as a AAA 1440p gamer. And it's pretty dumb to crap on 1080p gamers as they make up like 90+% of steam gamers. But no, the x3d does not just offer benefits to esport gamers (one of the stupidest things I've seen in a while AND THATS SAYING SOMETHING.) Abd when I built my rig with my 7800x3d, I paired it with a RX7900xt and couldn't be happier.
    • Um, someone needs to tell this author the 7800x3d is a single ccd and shouldn't be affected. If this only effects the dual ccd, 7800x3d owners need not worry
    • Popular File Explorer alternative Files gets signature check, improved dual-pane, and more by Taras Buria A new update has arrived for File Preview, a feature-packed file manager for Windows 10 and 11. Version 3.9.14 introduces a useful new feature for file properties, dual-pane improvements, the ability to resize columns in the Columns View, and more. Starting with the Properties dialog, it now features a "Signatures" tab where you can view digital signatures associated with the file and their properties, such as version, issuer, expiry date, and more. You can also click the "Details" button to open Windows' native dialog. The dual-pane feature has been tweaked for a more intuitive experience. The "Add pane" command is now "Split pane." There is a new quick action for toggling dual-pane mode on or off, and settings now have a dedicated section for dual-pane mode. Finally, columns in the Columns View are now resizable, and search results now have a header with your current query. In addition to releasing the update, developers said the following regarding performance complaints from users: Files Preview is available in the Microsoft Store. You can purchase it there to support developers. Alternatively, you can get the app for free from the official website, and if you want to help developers with contributions or ideas, check out their Discord and GitHub.
    • So the iPhone only has a leading position in a few markets around the world: US, UK, UAE, couple of other smaller ones. As a result of the far more mixed eco-system Whatsapp is a lot more popular outside of the US than I think a lot of American's may realise. It's pretty much the messaging standard in the UK
  • Recent Achievements

    • First Post
      Soeaker4thedead earned a badge
      First Post
    • First Post
      kryptickid earned a badge
      First Post
    • First Post
      Nemesis-IV earned a badge
      First Post
    • First Post
      Aidan Helfrich earned a badge
      First Post
    • Collaborator
      bullgod69 earned a badge
      Collaborator
  • Popular Contributors

    1. 1
      +primortal
      760
    2. 2
      ATLien_0
      187
    3. 3
      +FloatingFatMan
      151
    4. 4
      Xenon
      117
    5. 5
      wakjak
      113
  • Tell a friend

    Love Neowin? Tell a friend!