• 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

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

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.

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

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

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

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

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

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

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

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

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

By your definition perhaps. Others would disagree.

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

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

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
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.
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.

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

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
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

    • PDF-XChange Editor 11.0.1.0 by Razvan Serea PDF-XChange Editor is a comprehensive PDF editor that allows you to create, view, edit, annotate, and digitally sign PDF documents with ease. With advanced features like OCR, document security, and PDF optimization, PDF-XChange Editor is a powerful tool for both personal and professional use. Whether you need to edit text, images, or links, or add comments, stamps, or watermarks, PDF-XChange Editor provides all the necessary tools to make your PDFs look perfect. Additionally, it supports a wide range of file formats, including PDF, XPS, and DOCX, making it easy to convert and share your documents. PDF-XChange Editor key features: Edit text and images in PDF documents Add and remove pages from PDF files Annotate and markup PDFs with comments, highlights, and stamps Use OCR to convert scanned documents into searchable text Create and fill out PDF forms Sign and certify PDF documents digitally Add and edit hyperlinks within PDFs Extract text and images from PDF files Batch process multiple PDF files at once Customize the interface to your preferences Work with multiple documents in tabs Convert PDFs to other formats such as Word, Excel, and HTML Use advanced redaction tools to permanently remove sensitive information Add customizable headers and footers to PDFs Merge multiple PDF documents into a single file Split PDF documents into multiple files Add watermarks to PDF documents Use the measurement tools to calculate distances and areas in PDFs ....and much more PDF-XChange Editor 11.0.1.0 changelog: Fixed a crash in the new Open/Save dialog box when creating a new folder in an unavailable network path. (49552) Fixed a rare/infrequent crash on some dynamic XFA forms after changing their field values. [installer] Fixed an issue where shortcuts were lost during an upgrade from the previous version. [installer] Fixed an issue preventing migration of serial keys during updates from version 10. Fixed the issues with the shell context menu after installation of version 11. Fixed the issue with filtering comments. (49478) Fixed the issue that caused "Error [IO subsystem]: Invalid access mode." when converting PDFs to MS Office formats. Fixed an issue with the context menu position on some multi-monitor systems. (48467) Fixed an issue with handling complex custom file filters, displayed by JS, in the new Open/Save Files dialog box. (49486) Fixed several issues with the new 'Select Folder' dialog box. (49505) Fixed an issue with the new custom 'Open File' dialog box when using double-click to open it. (49498) Fixed an 'infinite' loop/proliferation in the 'Open Files' and 'Manage Places' dialog boxes. (49526) Fixed an issue with handling the mouse wheel inside the document "Find" box. (49539) Fixed an incorrect behaviour in the 'Go back (Alt+Left)' button in the new Open/Save Files dialog box. (49510) Fixed an issue with the shortcut keys (Alt+Left/Right) after navigating via breadcrumb paths in the new Open/Save Files dialog box. (49554) [installer] Fixed an issue with redrawing the progress text in the EXE installers. Fixed the issue where a mouse click outside of the polyline/polygon context menu during annotation creation would cancel the annotation. (49475) We switched back to using the system Open/Save/SelectFolder dialog box by default, instead of using the new one, because some popular features such as the QuickAccess/Recent items are missing in the new version. These will be added in a future release. Replaced the 'Extension' column in the new Open/Save File dialog box with a more user-friendly 'Type' column. Also fixed some issues when handling the 'Show file extension' option. (49497) Added the ability to authenticate local network shares in the new Open/Save Files dialog box. (49557) Improved the handling of dates after 01.01.2030 in XFA files - now such dates are stored properly when set via the dropdown widget. Flags NoZoom and NoRotate are now respected for only a limited subset of annotations. Download: PDF-XChange Editor (64-bit) | Portable ~300.0 MB (Shareware) Download: PDF-XChange Editor (32-bit) | Portable ~200.0 MB Download: PDF-XChange ARM64 | 276.0 MB Download: PDF-XChange Portable @PortableApps.com | 97.0 MB View: PDF-XChange Editor Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Still 3x what it should cost. So, it seems the trick is to increase price by 6x so that a reduction in price back to 4x looks like a steal. "You savvy shoppers win again!" I'm glad I'm not in a desperate spot to actually even need this overpriced crap. Hopefully, it comes back down by the time for when (or if) I ever do.
    • Although AI is great and has it's use cases they likely have massively overhyped it and it has not delivered as per their expectations. I fully expect them to start saying the same things again when it does get to a certain level of intelligence!
    • Microsoft wants to end printer driver headaches with Windows Ready Print by Usama Jawad A few days ago, Microsoft released Windows 11 Experimental build 26300.8553, bringing a ton of enhancements such as Start menu customization, search improvements, Taskbar polish, and other minor UI tweaks. Another relatively major enhancement snuck deep within the change log was related to upgrades to the Windows printing experience. Now, Microsoft has shared more details about these benefits. For starters, Microsoft has renamed its Modern Print Platform to Windows Ready Print. The company believes that this name highlights its shift in strategy, which now focuses on modernizing, securing, and streamlining the printing experience for Windows devices. Some of the upgrades present in Windows Ready Print have already been seeded to customers and partners. This includes ending support for third-party printer drivers via Windows Update and transitioning towards the Internet Printing Protocol (IPP) and the native Windows IPP printer driver. In line with these changes, new printer installations will default to Windows Ready Print on eligible devices starting from July 2026. However, Microsoft recognizes that not all environments will be able to migrate to this platform immediately, so it will allow users to choose between installing the printer via Windows Ready Print or the traditional OEM process. Users will be able to toggle this configuration through Settings > Bluetooth & Devices > Printers & Scanners > Printer preferences. This control applies only to new printer installations, and its functionality can also be modified via Group Policy as follows: Launch Group Policy Editor Navigate to Local Computer Policy -> Administrative Templates -> Printers Find and select 'Configure Windows Ready Print driver ranking' -> double click to open it Select 'Enabled' (if you wish to enable Windows Ready Print driver selection) or 'Disabled' (if you wish to explicitly disable Windows Ready Print driver selection). Select Apply Select OK Similarly, if you set up Windows protected print mode through the same setting in Windows 11, it will also default to using Windows Ready Print exclusively. Microsoft hopes that these improvements will help eradicate dependency on OEM-specific driver installation processes and simplify printer installations. We'll likely find out more about other tangible benefits in the coming months.
  • Recent Achievements

    • One Month Later
      johnjacobb40 earned a badge
      One Month Later
    • One Year In
      Primer1st earned a badge
      One Year In
    • Experienced
      JayZJay went up a rank
      Experienced
    • Reacting Well
      Sir_Timbit earned a badge
      Reacting Well
    • Week One Done
      rubentuben8 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      513
    2. 2
      PsYcHoKiLLa
      231
    3. 3
      +Edouard
      138
    4. 4
      ATLien_0
      87
    5. 5
      Steven P.
      81
  • Tell a friend

    Love Neowin? Tell a friend!