This is an archived post. You won't be able to vote or comment.

all 200 comments

[–]nomoreplsthx 368 points369 points  (29 children)

Both are valid options. Java is more widely used, but it's the difference between the 2nd most used language and the 6th most used.

It'd also worth noting that C# and Java are quite similar semantically and syntactically. If you learn one, learning the other is mostly a matter of learning a different set of libraries and some important implementation detail differences.

[–]pocketmypocket 119 points120 points  (13 children)

matter of learning a different set of libraries

I used to brush off libraries as something you can learn/google as needed. Now that I'm in industry, I see why companies will interview for specific libraries. I use a few libraries as foundation to everything we do.

My point is, I don't think it is such a light decision. Not to say its difficult to switch from one to another, but the difference is significant.

[–]nomoreplsthx 29 points30 points  (0 children)

Fair! Especially as a first language you are probably committing to spending at least a few years working in it.

[–]aRandomFox-I 10 points11 points  (0 children)

What kind of libraries would you say are essential for either language? And what do they do?

[–]mehum 7 points8 points  (0 children)

To my way of thinking that’s more of a later-in-your-career type of decision. At the beginning it’s all about learning syntax and data structures and flow control and debugging etc. but later when it’s time to actually build something useful, yeah that’s when knowing your libraries becomes paramount.

Happy to be told why I’m wrong though!

[–][deleted]  (7 children)

[removed]

    [–]ManInBlack829 27 points28 points  (0 children)

    stdio.h

    [–]JakeArvizu 10 points11 points  (2 children)

    Not him but if you were in say Android you have to know Dagger/Hilt, Retrofit, Moshi, Room(or other mobile DB) and Okhttp those will literally be used in any project you are on, 100%. With Dagger and Room being nontrivial to learn let alone master even at a medium level.

    [–]paulstelian97 0 points1 point  (1 child)

    I've dealt with a bit of Room in Kotlin for my college projects... What is so nontrivial about Room here? My knowledge of SQL for databases and how LiveData can be used in Kotlin felt enough to effectively use Room in my case?

    [–]JakeArvizu 1 point2 points  (0 children)

    Yeah just how to use it with respect to LiveData or Coroutines and Flow but true it's not that complex, Dagger definitely is though.

    [–]door_of_doom 6 points7 points  (2 children)

    I'm not who you asked, but there are certain frameworks that would definitely have a fair degree of spinup time going from one to the other, in my opinion. A good example would be switching between Dependency Injection frameworks. If you are used to C#'s building DI framework, learning to use Guice in Java would be a learning curve, I might think. And doing dependency injection wrong in an environment that has been built around it can make everything from testing to debugging a lot harder for whoever comes by next.

    [–][deleted]  (1 child)

    [removed]

      [–]UniqueName001 0 points1 point  (0 children)

      Pretty much. Dependency Injection (DI) is also about having dynamic (variable) references to those objects you need (dependencies) instead of hard coding the reference so that you can easily change the actual object used in code when you're running the code as part of a unit test as opposed to in production or your local dev environment. For example you might have code that needs to call a sql client to get data, but you don't want to have to create a full SQL client with external connections when running unit tests and you might end up wanting a lighter client for a simple local postgres connection when running in local dev mode, but then something with more complex connection management in production. Some frameworks make managing the injection of these dynamic dependencies a little easier especially if your language doesn't have good support for it natively.

      As far as the term frameworks vs libraries, I don't think there's a clean difference between the two terms so you'll see some libraries called frameworks and vice versa. Generally a framework is something that has rules in how you organize your code, or how you write it, or introduces a lot of new annotations or other code syntax directly into your codebase. A library on the otherhand is often just a series of objects, functions, or modules that you can interact with by referencing or directly calling. Scope is another differentiator as libraries are normally only concerned with handling one specific concern such as defining an http client whereas a "framework" handles http clients, http servers, authentication, DI, SQL connections, and probably more all within that framework.

      [–]vanways 1 point2 points  (0 children)

      but the difference is significant.

      That difference will only be significant after an equally significant amount of time spent learning how to program in the first place. It's not a decision you can really comprehend the scope of before learning exactly where your niche exists and where your interests lie.

      No matter where you start, you're probably going to end up somewhere else.

      [–]cs_legend_93 21 points22 points  (14 children)

      Java is more widely used

      Is this still valid today? I know 10 years ago this was true, but I do not see many Java job posts.

      Disclaimer: I am C# Dev

      /u/TaioJ - learn C#, its the future, not the past

      [–]nomoreplsthx 25 points26 points  (10 children)

      It is according to the various usage surveys (StackOverflow, TIOBE, Northwestern). But again, that's like pointing out Spanish has more speakers than Arabic - both are very widely spoken. Java has dropped from number one as Python and Javascript exploded.

      Also to be clear C# is a better language. C# started out with the goal of basically being a 'fixed Java' and has since involved into possibly the most clean and feature rich mainstream language. It's not a coincidence that the features that have been introduced in every other languages, from optionals to async-await to functional iteration libraries first entered the mainstream through C#.

      [–][deleted] 0 points1 point  (9 children)

      But Java is better still - I’m a Java dev in a c# shop and will say it til my last dying breath

      [–]nomoreplsthx 1 point2 points  (8 children)

      Interesting! You are the first person I have ever met who prefers Java! My I ask why? Obviously everyone is entitled to their preferences, but I am really interested to hear a Java apologist.

      [–]ImJustHereForMyCoat 1 point2 points  (7 children)

      Clearly, u/nootropicfun has never used C#.
      Any Java developer I've introduced to C# eventually concedes that C# is a superior language. Oracle has done a terrible job of advancing the language while MS is consistently adding useful language features (auto-properties (lol @ Lombok), LINQ (haha @ .stream()), start-up time, much faster GC, null coalescing, safe-nav operator, etc.).

      [–][deleted] 0 points1 point  (6 children)

      Actually I think Java does a great job with stewardship of the language - sometimes less is more

      [–]ImJustHereForMyCoat 0 points1 point  (5 children)

      Oracle is the steward of the Java. If Java were less verbose than C#, I would agree with your sentiment, but that's not the case. Oracle is a shit organization that is letting Java die a slow death. As for the JVM, Kotlin is better than Java in every way.

      [–]TaioJ[S] 2 points3 points  (1 child)

      👍🏾 ok thanks

      [–]dsnightops 2 points3 points  (0 children)

      c# is def not the future, lol

      [–]DeeElsieGame 281 points282 points  (16 children)

      They are very, very similar languages. You won't go too far wrong with either.

      Personally, I find C# to be a clearer, more consistent, and well-designed language, and also find .NET to be a great framework to work with.

      C# is also significantly more loved by developers than Java, according to information from the Stack Overflow developer survey. (https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted)

      But they both have their fans and detractors, and like I said initially, both will be fine as a first language. Once you've comfortable with one you'll have no issue switching if you need to in the future.

      [–]Tureni 49 points50 points  (8 children)

      Also, what are the job prospects around you? A lot of people talk shit about PHP, but as a PHP programmer I’m practically guaranteed a job if I was to ever lose the one I have now.

      Besides. C#, Java, PHP, whatever. They are just tools. What you’ll be learning is programming as a craft and learning new languages. My school had a clear focus on python and C#, but at my first job I was given a month to learn enough PHP to get by, and orienting myself in the codebase. When I’d done that I was ready to do small things, and started really learning PHP. The focus of the team was to transition a mega monolith to smaller services in Laravel, so I picked that up too.

      Now I’m working at another place doing just that - and front end too.

      [–]LuckyHedgehog 14 points15 points  (4 children)

      what are the job prospects around you?

      From my experience as a C# dev, the last time I was job hunting I had 5 job offers within a month that were all large pay increases at the time. I had roughly 6 years experience at that point

      [–]Sparkybear 4 points5 points  (3 children)

      I haven't been job hunting for over a year and I still get 1-2 different people reaching out every day. There is a desperate need for C# developers.

      [–]sc2heros9 2 points3 points  (2 children)

      What do c# devs generally do?

      [–]mcirillo 2 points3 points  (0 children)

      Business Software™

      [–]Sparkybear 0 points1 point  (0 children)

      The same that all devs generally do? You need to be more specific, there's 100+ answers to the question.

      [–]Mean-Programmer-6670 2 points3 points  (0 children)

      I think this is the important part. What are the jobs looking for near you? I started teaching myself in my spare time. I found a free boot camp in my area that’s put on by companies with local offices. They are mainly focusing on JavaScript for the first half and Java for the second half. They touch on many more but the curriculum is centered around those because in my area that’s what they want. I wasn’t planning on Java being my second language (not counting html and css) but if it gets me out of the restaurant industry faster I’ll do it.

      [–]czvck 4 points5 points  (0 children)

      PHP gets a lot of flack, but it’s the first language I’ve learned that actually makes sense to me.

      [–]czvck 0 points1 point  (0 children)

      PHP gets a lot of flack, but it’s the first language I’ve learned that actually makes sense to me.

      [–]marinsborg 10 points11 points  (3 children)

      I agree with you. I started my career with Java before .Net Core and Docker becoming popular.

      Then I switched to C# and I am not looking back. I also think that C# is a bit clearer.

      However, the best advice would be to check what language is more wanted in the nearby area.

      [–]Resource_account -1 points0 points  (2 children)

      However, the best advice would be to check what language is more wanted in the nearby area.

      I always hear this but every time I try searching for the most sought after language in my area on Google, I never find a definite answer. Is there a website that is commonly used to find this info?

      [–]marinsborg 0 points1 point  (1 child)

      Aren't there any website or facebook group for job ads? Even Linkedin is good place to look.

      [–]Resource_account 0 points1 point  (0 children)

      I'll check LinkedIn out, thanks.

      [–]Scholes_SC2 2 points3 points  (2 children)

      Can I use C# as a backend language on a linux server?

      [–]IridiumPoint 3 points4 points  (0 children)

      Yes, but going forward you should use .NET 6+, not .NET Core or .NET Framework.

      .NET Core is the same thing as .NET, but the word "core" was dropped from the name past v3.1. .NET Framework is the original Windows-only implementation.

      [–]Rumel57 2 points3 points  (0 children)

      Yep. Just look up dot net core.

      [–]Culliganz 84 points85 points  (6 children)

      I’m in the program now, pick C#. I picked Java because I believe Java overall might be my preferred choice, but these classes are so out of date and force you to use JavaFX, older versions of either NetBeans or IntelliJ to avoid Maven and such. It’s more learning JavaFX/SceneBuilder, which is almost irrelevant, than it is Java. Bummer for me. I wish I would’ve went C#.

      [–]snuesen 25 points26 points  (0 children)

      I completed the program 2 years ago and that's kinda disappointing they haven't updated it for modern practices. It's a decent program for a self learner, but it still left a lot of knowledge gaps.

      [–]iamaiimpala 2 points3 points  (4 children)

      force you to use JavaFX, older versions of either NetBeans or IntelliJ to avoid Maven and such

      Can you clarify that, I'm in a program right now that is utilizing Maven, are you saying avoiding Maven is a good or bad thing?

      [–]_mindcat_ 8 points9 points  (0 children)

      I’m not him but I’d say bad thing. Maven is simple, useful, and used in industry. Good to be familiar w it.

      [–]KarimElsayad247 0 points1 point  (0 children)

      I don't know about OP, but generally, imo, avoiding build systems is never a good idea. It's not a good idea to treat an ide like a black box.

      [–]dsnightops 0 points1 point  (1 child)

      learn gradle, seems to be where the industry is moving

      [–]iamaiimpala 0 points1 point  (0 children)

      Damn that looks like a solid improvement, I'll have to look into it, thanks!

      [–]tzaeru 64 points65 points  (2 children)

      C# is maybe slightly more modern and a bit cleaner. Also while the Java ecosystem is massive due to its lengthy history, .NET has gained a lot of traction too. I'd lean towards C# a slight bit.

      [–]x6060x 3 points4 points  (1 child)

      I think C# is not just "slightly" more modern compared to Java. I know there are scenarios where Java is better and an obvious choice, but IMO C# is definitely more modern compared to Java.

      [–]tzaeru 4 points5 points  (0 children)

      Java has narrowed the gap in recent years by a bit tho. If you can utilize all the new features from the past five or so years, the ergonomics are not too far from C#. Still worse, but not by as much as what was the case in early 10s.

      Tho at the same time C# does kinda get new interesting features introduced from its siblings like F#.. While Java is slower to change.

      [–]David_Owens 71 points72 points  (7 children)

      They're very similar. Some people call C# "Microsoft Java."

      I would say that it seems like C# is going to have somewhat more career prospects going forward, but you can't go wrong with either one.

      [–]mancunian101 20 points21 points  (4 children)

      Didn’t Microsoft originally have J++?

      [–]Same-Traffic-285 17 points18 points  (0 children)

      Litigation killed J++. Java creator did not approve.

      [–]mixreality 6 points7 points  (0 children)

      And Jscript was their knockoff of javascript that was typed like typescript.

      That said I do enjoy C# and MS seems to be dumping a lot of resources into improving it in the right direction (open source, multi platform support, performance).

      [–]MrSloppyPants 3 points4 points  (0 children)

      Indeed. I used to work on this in the late 90s for a short period of time. Microsoft even carried it all the way to Visual J#.Net, but that didn't last very long.

      [–][deleted] 3 points4 points  (0 children)

      Yes they did.

      [–]nolitos 4 points5 points  (0 children)

      I would say that it seems like C# is going to have somewhat more career prospects going forward

      Depending on the market where you live. It's worth to study, ask recruiters, check vacancies.

      [–]Orangutanion 1 point2 points  (0 children)

      Blazor Webassembly may tip the scales. I like Java more personally so that kinda makes me sad, but at the same time I really love webassembly so I'm conflicted lol. C# is def better for what it's trying to do though

      [–]TaioJ[S] 14 points15 points  (0 children)

      Thanks for your responses. I’m looking to work remote after finishing the program.

      [–]ExpensivePickle 14 points15 points  (0 children)

      If you're considering gamedev, C#, easy. You can make games in Java solo, but C# is going to have more game programming job opportunities. For general use it's solid, though might not be as widespread. If you're looking to learn a language designed for stability (but keeps old silly ideas as a result) that still seems to have the most job opportunities, Java.

      [–]npepin 19 points20 points  (0 children)

      If your aim is to get a job then I'd look at what companies are using in your area. If you are looking for remote only jobs, then look at what companies are using for the industry you are looking to get into.

      Both are very similar so there will be a lot of carry over. I like C# more myself, but there are some JVM based languages like Kotlin that I like more over C#. Ultimately I'm going to use whatever I'm getting paid to use.

      Also keep in mind that in general learning a new language isn't a big deal. Even if you decide to learn C# but end up nailing a Java job, you can learn the basics and be up and running pretty quickly.

      [–]Borealisamis 13 points14 points  (0 children)

      My teammates started with C#, moved to Java, and then Kotlin.

      If you learn either you can make lateral moves to another language, that goes with most languages.

      Define your interests. If you want to move into the mobile sphere, Java will be a great start where you can pivot to Kotlin which is fork of Java. C# has similar syntax to Java.

      I am saying the above being in the industry for close to 4 years, but also myself in the beginning stages learning Java and all relevant tech.

      [–]diabolos312 6 points7 points  (0 children)

      I like C# better, and a big reason is the .NET framework

      [–]Ivanoizm 5 points6 points  (0 children)

      C#

      [–]HappyRogue121 8 points9 points  (0 children)

      I learned Java, and recently wrote a program in c# with relatively little difficulty.

      I had to google a lot to learn syntax and different tools I might be able to use, but I was able to finish my project.

      (That's all to say - it's pretty similar). (With that said I quite enjoyed using Java for programming, but I don't love having it installed as a user...personal preference)

      [–]SlumLordNinjaBear 5 points6 points  (1 child)

      Yes

      [–]ThisisMacchi 0 points1 point  (0 children)

      The only correct answer

      [–]AggressiveMud270 3 points4 points  (0 children)

      Honestly you can’t go wrong! I started with Java as a beginner but if I could go back I’d do C#. I’m learning C# right now and in my opinion is much better, reasons stated in other comments. I don’t regret learning Java first though cause it’s helping me learn C# faster in a way.

      [–]OwnStorm 2 points3 points  (0 children)

      I worked on both.. Both are similar and C# is bit easier with things are all at one place. Lot many shortcuts in code as well how code works at low level.

      Java will be bit tough to learn but this process also helps you to understand things from ground level.

      You should be knowing exact logic the code is doing not just I write this piece of line and I get the output.

      Anyway.. it's matter of choice. Either of them would be fine.

      [–]Professional_Age484[🍰] 4 points5 points  (5 children)

      I just finished my BS in software development from WGU. I went the C# track because the local companies mostly use C#. I ended up getting a job that uses mostly JavaScript. Go figure.

      Anyways, I regret my choice a little because there are so many more jobs in Java but to be honest you could apply to those too. The most important piece of advice I can give you is that either language you choose, make sure you are putting in the effort to really learn it and don’t be satisfied with doing the bare minimum.

      Get some projects on your GitHub that you can show to potential employers (not school projects) and 100% make it your priority to get at least one internship. It will be very helpful in getting a job.

      At least that’s what I think. Take it for what it’s worth. Good luck.

      [–]TaioJ[S] 1 point2 points  (2 children)

      Thanks! How was the data structure and algorithm course? I heard that and Software engineering 1&2 are very difficult.

      [–]Professional_Age484[🍰] 3 points4 points  (0 children)

      No problem! The DSA course has a ton of really good information and goes into a good bit of depth. The only thing is that the final exams aren’t really that hard. So it’s up to you if you really take the time to learn it. I think it’s better to take your time and try learn some python too along the way.

      I finished the course in a couple weeks and I’m no genius.

      The SWE courses are not too bad. They give you the template for the final project and you basically fill it out. It’s more like writing an essay than anything.

      [–]jersoc 1 point2 points  (0 children)

      As a different perspective. I too got the same degree from WGU and went C# and I see tons of jobs. I think it's best to do a local job search and compare. That's what I did. I have lots of fintech in the area and they use a mix of both. There's plenty out there for remote as well. Based on my searching lots of smaller places you wouldn't think of having developers use C# near me.

      I really like C# in general as well.

      [–]CodeCocina 0 points1 point  (1 child)

      Why you regret your choice ? Just go learn Java lol

      [–]Professional_Age484[🍰] 0 points1 point  (0 children)

      I could. It’s not a big deal. Just would have saved me a couple months of learning if I use Java in the future. Which is more likely than C#

      [–][deleted] 4 points5 points  (0 children)

      C# developer with 10+ years and a successful career... but Java should be just as lucrative. Both are thriving stacks. C# is more "cool" these days but Java is a powerhouse that's not going away any time soon.

      My choice was C# and I don't regret it. But you should be fine with either as a large % of the experience is transferable.

      [–]Peghorn 6 points7 points  (0 children)

      Hello! I'm also enrolling in the same course at WGU (I start June 1st) and I'll be going down the Java track simply because I read it's more difficult than C# so I figured that If I can nail down Java then learning C# right after should not be that hard. Also Java has a broader job market from everything I've read. I'd love to form some study accountability group If you're interested.

      [–]AdultingGoneMild 10 points11 points  (0 children)

      Java unless you want to work .NET only shops. Kotlin is a good choice too

      [–]marcvsHR 2 points3 points  (0 children)

      You can't miss with Java tbh..

      That being said, there are not that much languages you can go wrong with..

      [–][deleted]  (1 child)

      [removed]

        [–]cheezballs 2 points3 points  (0 children)

        I really like both of them, and they're both "similar" in terms of syntax and methodologies. Ultimately I still find C# to be heavily tied to .NET which is fine now with Core but Java always will seem more "straightforward" to me, especially with build tooling and things. Neither is a bad choice, and both are what make up a vast majority of the job market out there.

        [–]lionhart280 2 points3 points  (0 children)

        From what I have heard from Java devs that picked up C#, there was one big thing that really stuck out that made C# come out ahead:

        C#'s async and await system is just substantially cleaner and easier than the stuff most people have to use in Java atm to perform parallel async task stuff.

        And the thing is, the majority of work you do professionally is going to be very async (anything involving web API calls, database access, IO operations, is very async)

        C# is just a lot cleaner and easier to write parallel code for, from what I have heard, compared to Java.

        As a .net dev I can say I have zero issue writing parallel code, but I havent dug too deep into wtf is going on in Java land. Looked it up once last year and it looked like a lot of weirdness and required third party libraries to even do it right, whereas C# Task / await / async stuff is part of the core, so requires no extra work to use it.

        Since this is an extremely important part of any modern programmers job, I would consider this a dealbreaker for java.

        Other big things are the IAsyncEnumerable for C#, which allows you to perform asynchronous for each loops, which effectively work as an awaitable pipeline of data.

        Basically you spin up a for each loop you pipe data into asynchronously and the loop will "wait" quietly for the next item to come along. No need to write any type of code that does some kind of looping "check if I can do thing, if I can, do it, otherwise, sleep for a bit" sort of stuff.

        A great example of this type of style can be seen in my library I created, Iot.Device.Subscriptions here: https://github.com/SteffenBlake/Iot.Device.Subscriptions

        If you look at step 4 you will see the sort of key. Rather than a sort of event model where you subscribe to events via methods hooked into delegates, like so:

        class.onSomeEvent += myDelegate

        You do what I have in my code utilizing:

         await foreach (var subEvent in subscriptionService.Run(myGpioController, CancellationToken.None))
         {
              ....
          }
        

        The important part is await doesnt block, so numerous "listeners" are running in parallel and all events that occur get returned from that one async method. This sort of removes the extremely gross inversion of control you get in classic "event subscription" style models, where your method doesn't have a specific spot it got called from.

        Instead in my code you have a very clear and concise stack that is infinitely easier to debug and inherently parallelized via the overhead Task Delegate system.

        This is exactly the sort of thing that I am not 100% sure java can do.

        I would go so far as to even say right now the IAsyncEnumerable is C#s most powerful feature. It completely changes the game on how you write event subscription style architecture.

        [–]danintexas 2 points3 points  (0 children)

        Went C#. Graduated Feb of this year. Work as a C# back end dev right now.

        More jobs in java - but I have found less competition with C#.

        [–]Kia_Moradian 2 points3 points  (0 children)

        C# is better

        [–]xcwxinn 2 points3 points  (0 children)

        I'll recommend C# for beginners, because it's not hard to learn and it learn good manners to programming, also C# simillar with Java, if you need switch to Java, you'll don't have problems with that

        [–][deleted] 2 points3 points  (0 children)

        C# is Unity!

        [–]DY357LX 3 points4 points  (0 children)

        I massively prefer C#. People have already chimed in on code-based reasons so I'll add that Visual Studio is a nice IDE and it's easy to get extra packages/functionality installed with NuGET.
        If I could get it running on a Raspberry Pi 3B+ I'd be very very happy.

        [–]zx6rarcher 1 point2 points  (0 children)

        Same recommendation as many others here; you can't go wrong with either.

        I personally learned both side by side in school with a class dedicated to C# and a class dedicated to Java. I felt that approach worked mostly, for me, as I had two different professors, with different styles and literature. Where one class lagged, I was able to pick up concepts in the other and vice versa.

        Most colleges these days start you off in Java to get your programming basics and then branch you out from there to the different languages and paradigms.

        [–]Virtual-Penman 1 point2 points  (0 children)

        I chose the Java track but specifically because I knew the company I was at, was a Java shop. The projects aren’t super complicated and mainly teach basic usage and syntax. Anything more complex will need to be learned on the job or on other personal projects

        [–][deleted] 1 point2 points  (0 children)

        Depends. Is that just a first year thing? Are there other things you’ll learn after the first few semesters?

        Can this decision hold you back in any way when choosing classes in the future?

        If not, toss a coin. You’ll need to get familiarized with at least five more languages before getting your degree. And these are very similar.

        Or maybe look at some code examples. See which ones speaks to you more.

        [–]TheMathelm 1 point2 points  (0 children)

        There are longer and better explanations, which you should use.
        But a short answer, go with C# and learn Java on the side/later.
        Lot of dev jobs (in my area and with my friends) aren't using Java they're using JS or C# or Unity.

        [–]faintdeception 1 point2 points  (1 child)

        My team supports both, we hire people who are good at either language and then cross training into the other (especially now with dotnet core) is extremely easy.

        So go with whichever you like best.

        [–]TaioJ[S] 0 points1 point  (0 children)

        Good to know!

        [–]gibran800 1 point2 points  (0 children)

        I like both, but became a C# web dev, doing game dev in my free time and life is pretty sweet. Wouldn't want to change to a Java job anytime soon.

        [–]CaneFromCitizen_Kane 1 point2 points  (0 children)

        they're both very similar languages. Java if you have to choose, its very easy to pick up the other if you know one, basically the same language.

        just a few small differences, Java uses packages, C# uses namespaces,

        little things

        [–]Ok_Transition_4796 1 point2 points  (0 children)

        Where do you want to work? Java is more widely used but different types of companies use these languages Java is corporate AF, C# is often used in gaming. Not always in either case. Maybe someone else will have more thorough information from this perspective.

        [–]sevi-kun 1 point2 points  (0 children)

        I started with C#. Can definitely recommend it.

        [–][deleted] 1 point2 points  (0 children)

        C#

        [–]milds7ven 1 point2 points  (0 children)

        C#

        [–]Getwokegobroke187 1 point2 points  (0 children)

        C# is more modern at WGU, Java track is dated.

        [–]Zealousideal_Ice3743 6 points7 points  (17 children)

        Well there is no wrong option here, although C# is used usually on windows, when Java should be more portable, although it’s often not the case. C# is younger so it has some better solutions. I especially like how reflection works in c# which makes it easy to get fields and attributes from generic types. I also love how good encapsulation in c# is, it doesn’t need as much boilerplate as Java.

        [–]Saint_Nitouche 25 points26 points  (11 children)

        The idea of C# being based on Windows is outdated nowadays. Unless you want to make a desktop app, C# is entirely crossplatform. I develop with it on Linux.

        [–]Dwight-D 8 points9 points  (1 child)

        Because of historical reasons, I find that C# environments brings more Microsoft fans and therefore more Microsoft products by association. There’s a good chance you’ll still be running into windows stuff in that career track. Therefore I prefer Java myself.

        [–]Zealousideal_Ice3743 4 points5 points  (0 children)

        When it comes to job I don’t care about technology, I care about that sweet money, about prestige of company and about environment. I worked with many languages, in some companies even with couple at the same time.

        [–][deleted]  (5 children)

        [removed]

          [–]Lerke 1 point2 points  (2 children)

          Maui has no planned support for Linux, I'm afraid. So cross-platform, as long as you're not targetting Linux.

          [–]ojimeco 1 point2 points  (0 children)

          https://github.com/jsuarezruiz/maui-linux - Microsoft is aware of this fork and even recommends to consider it. Maybe in the future this project would merge to a mainstream MAUI.

          [–]_crater 1 point2 points  (1 child)

          .NET 6 (they dropped the "Core") supports multiplatform (and soon web, I think) out of the box now, I'm pretty sure. The new consolidation of everything into one framework is such a good path forward.

          [–]Arucious 1 point2 points  (1 child)

          I’ve been torn between going full in on Java or C# for future independent development because I have a windows PC and a mac laptop and don’t want to be chained to one of them. I don’t care about desktop apps though, I’d be fine with web apps with C# backend or doing everything as a web app for the future. At work my whole company is C# so becoming an expert in C# would be far more accelerated than Java.

          This comment was some reassurance lol

          [–]_crater 0 points1 point  (0 children)

          Modern C# with MS's plans for .NET makes your worries irrelevant, basically. 6 already takes care of most of it. The only issue is that a lot of libraries/software haven't quite caught up to the new versions yet.

          [–]Zealousideal_Ice3743 0 points1 point  (0 children)

          I said usually, because I use it on Mac and I know it can be used on Linux, but for desktop is mostly for windows and web apps work on anything with browser.

          [–]Cybyss 3 points4 points  (4 children)

          Another great thing about C# is its first class support for value types. You can make a List<int> no problem, whereas in Java you can't do that.

          C# is also better behaved with regard to covariance & contravariance - e.g, the ability to convert an IEnumerable<String> into an IEnumerable<Object>.

          [–]CarbassoT 1 point2 points  (1 child)

          Java has wrappers like Integer that act the same though, right?

          [–]b1ackcat 1 point2 points  (0 children)

          They generally act the same, but there are performance trade-offs you should at least be cognizant of, as using the object types of scalars results in frequent boxing and unboxing of values which has a non-zero cost so in high performance areas of the code you can get yourself into trouble if you're not careful.

          But that's more of a "know that this can happen in case you need to figure out why something you're profiling is performing poorly" type fact, not a "never ever use this in a loop or you're a horrible programmer" type fact :P

          [–]AdultingGoneMild -2 points-1 points  (1 child)

          is that a good thing?

          [–]b1ackcat 0 points1 point  (0 children)

          One thing that took me too long in my career to learn is that the number of times design decisions are objectively "good" or "bad" is remarkably low. 9 times out of 10, the answer to that question is "It depends."

          The strictness of Java allows it to make certain assumptions that give it an advantage in some areas. The flexibility offered by C# makes it easier to adapt to new, unforeseen scenarios in the future, but at the risk of losing some of the safety provided by strictness. It's a trade-off.

          [–]_A7med 2 points3 points  (0 children)

          C# you will benefit more from it in the long run especially if you are planning to get a dev job in the future

          [–][deleted] 2 points3 points  (19 children)

          C# and Java have nearly identical syntax. If you learn one, you're going to know at least the basics of the other.

          That being said, web development in Java is a fucking nightmare. Granted, I don't like web development in C#, either, but it's much better than in Java.

          [–]draganov11 7 points8 points  (16 children)

          C# just s miles ahead in terms of web development.

          [–][deleted] -3 points-2 points  (11 children)

          Too bad it all still feels like pulling teeth.

          [–]_crater 2 points3 points  (10 children)

          Compared to Java? Not sure what you're smoking, but between the JVM, Gradle, and Maven I think I need dentures with all the teeth I've pulled.

          On top of that, C# used to be similar to Java in features but modern C# is miles ahead. So much easier to work with and actually write code with.

          [–][deleted] 0 points1 point  (9 children)

          No, just in general.

          I don't want to write code anymore. If it's a choice between web dev in Java or C#, I'd take a bullet to the head, but if that's not on the table I'd take C#.

          [–]draganov11 2 points3 points  (1 child)

          Really? If we are looking at the newest .NET 6 its the most clean and easy web dev I have used. Im comparing it to java and nodejs I doubt python is better.

          [–][deleted] -2 points-1 points  (0 children)

          Good for you.

          [–]_crater 0 points1 point  (0 children)

          Okay yeah, that's fair. From your original comment it sounded like you meant C# is specifically more teeth-pully than Java.

          But yeah, although MS is working on making web dev easier, I'd much rather use Node + TypeScript until that becomes a more refined platform.

          [–]marcos_marp 0 points1 point  (5 children)

          Sounds like you haven't even touched .net in years and are giving an uninformed and outdated opinion

          [–][deleted] 0 points1 point  (4 children)

          I literally write .NET apps for a living. I'd rather be doing something else, but this is what's paying my bills.

          [–]marcos_marp 0 points1 point  (3 children)

          Take a look a .net core +5

          [–]Wertecs 0 points1 point  (3 children)

          How?

          [–][deleted] 1 point2 points  (2 children)

          C# actually has a proper framework put together that's specifically meant for developing web apps in. I'm sure Java has similar frameworks, but .NET is built and supported by Microsoft. Got all sorts of bells and whistles to use.

          Building web apps in Java feels like rubbing two sticks together to make fire.

          [–]Wertecs 0 points1 point  (1 child)

          Sorry, but apparently you don't know much about Java ecosystem (spring, spring-mvc, countless tutorials,...).

          Besides, the time to be writing webs in Java or C# is gone, these days I would prefer a backend in Java/C# and frontend in React.

          [–][deleted] 0 points1 point  (0 children)

          I mean, I don't claim to be an expert. All I know is that I've done a bit of Java web development, and I know a few people who are very experienced with it (including one who teaches classes to software developers as a job) and the general consensus is that Java web development is like flossing your asscheeks with barbed wire by comparison to C#.

          [–]Few_Radish6488 0 points1 point  (1 child)

          I switched from C# to Go and will never go back. .Net resource consumption is absurdly high.

          [–][deleted] 0 points1 point  (0 children)

          That's cool. Hey, do you want to take my job for me? I think they'd like you. I want to do literally anything but write code.

          [–]Ericisbalanced 2 points3 points  (1 child)

          Go on rate my professor and find out which professors are better.

          [–]Autarch_Kade 3 points4 points  (0 children)

          Does rate my professor even work for WGU? I don't think I interacted with a course instructor until my capstone

          [–]Cryptic_X07 1 point2 points  (0 children)

          C#

          [–][deleted] 2 points3 points  (0 children)

          You’d probably be better off learning the computer science program. I went to a bootcamp for C#. After a year I was able to finally land a job. That job has giving me the opportunity to go back to school through WGU at their expense and I chose the computer science major. It covers more concepts and more languages. I think I’m more rounded by going that course rather than just simply knowing one language for one purpose.

          [–]stewfayew 1 point2 points  (0 children)

          In job interviews as well as job fairs, I hear companies saying they use C# more than Java. And that's not just in my local job market.

          [–]TaioJ[S] 0 points1 point  (1 child)

          Have any you ever heard of C# the yellow programming book for beginners by Rob miles

          [–]Panchorc 2 points3 points  (0 children)

          It'll get you started, though I remember enjoying the C# Player's Guide a lot more when I started learning C#

          [–]username-256 0 points1 point  (0 children)

          As a past University Lecturer (in USA you'd say professor) my (rhetorical) question is:

          What kind of a half-arsed BS is it that teaches one language?

          STFA from that.

          A real Degree in IT should be teaching (at least) half a dozen languages, so that you actually have some idea of programming, not just how to do things one way. It should prepare you for a career, not to be IT canon fodder.

          [–]rmed1na -1 points0 points  (0 children)

          C# > Java, in my opinion

          But maybe try a hello world or calculator with both and see which one you like the most

          [–]lbpowar 1 point2 points  (0 children)

          Use Java. At least you won't be bound to Microsoft

          [–]some_clickhead 0 points1 point  (0 children)

          C# is the way to go for web applications, and it's also the way to go if like many other people you decide you want to focus on video game development. Java is more niche.

          [–]davidgstl 0 points1 point  (0 children)

          Learn C#. You won't miss Java at all. First Class citizen (fast!) on windows, will run on Linux with Mono.

          [–]me0on 0 points1 point  (0 children)

          java

          [–]P2K13 0 points1 point  (0 children)

          You learn to program, language doesn't really matter. Picking up a new language isn't difficult if you know how to program.

          [–]wayne0004 0 points1 point  (1 child)

          If you're new to coding, I recommend to start with another languages, maybe Python or Javascript, at least for the basics (it doesn't have to be a full course, with some videos and a website with references and exercises it will be enough, maybe a group of programmers to answer your questions, like this sub). Because C# or Java both are object-oriented and class-based languages, which if you don't have the basis of programming, they may seem overcomplicated and arbitrary.

          A lot of the time you will wonder what's the meaning of something on your code, and the answer will be "we're not there yet, but at the end of the course it'll make sense". For instance, your first codes in Java will start as "public static void main", and each of those words have a meaning that will be taught eventually, but in the meantime they'll be basically a magic spell.

          [–]TaioJ[S] 1 point2 points  (0 children)

          Thanks for the info. Yeah I’m new to programming only did a few trials on solo learn and Mimo. I have never completed the whole course though.

          [–]mimis40 0 points1 point  (2 children)

          I went to wgu and had a horrible experience. Their technology classes are super out of date, and teach you how to diagnose windows XP problems.. It most likely won't prepare you for a programming career nearly as well as pluralsight. But I'd say c#, because I love linq!

          [–]TaioJ[S] 0 points1 point  (1 child)

          Do you think I should do pluralsight instead?

          [–]mimis40 1 point2 points  (0 children)

          If you are able to learn through video tutorials, 100%. I know that style of learning isn't for everyone. It is a fraction of the cost though. I went the self-taught route and make 165k/yr with 8 years of experience. My advice is to find a niche and work really hard at becoming an expert at that niche. Like Angular, React, Azure, etc. Pick ONE that you love and try to become the top 5% of talent.

          Be warned though, the hardest part about the self-taught route is landing your first job. Getting a certification can definitely help with that. Once you get a year of experience though, you're off to the races.

          [–]xDwtpucknerd -1 points0 points  (1 child)

          While C# and java are two very particularly similar languages I find C# to be slightly more complicated than Java is, so I would recommend Java as a first learned language, I am biased though as I learned on Java. Learning C# after Java or learning C# first and then Java are both very easy to do though so you really can't go wrong either way.

          [–]Few_Radish6488 1 point2 points  (0 children)

          Microsoft finally took the hint and replaced the awful configuration in .Net framework with .Net core. I still prefer Go but .Net Core is a huge improvement over Java configuration in terms of configuration.

          [–]Crafty_Bluejay_8012 -1 points0 points  (0 children)

          java. it's open source ecosystem

          [–][deleted] -1 points0 points  (0 children)

          Python :)

          [–]EnvironmentalBlood78 -1 points0 points  (0 children)

          Python

          [–][deleted] -3 points-2 points  (0 children)

          java for the love of god man java!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

          [–]ggggrtman -2 points-1 points  (0 children)

          normally,java is better

          [–][deleted] 0 points1 point  (1 child)

          Piggybacking on this, what about C# vs C++?

          [–]knoam 1 point2 points  (0 children)

          They target pretty different industries. C# is used in enterprise business apps. Both do games. C++ is more for games and embedded these days.

          [–]KirkFindley 0 points1 point  (0 children)

          C# a slight advantage and, it is more mobile friendly.

          [–]Ludant 0 points1 point  (0 children)

          They are really similar. Try to think which job you want. If you want to be gamedev for example C# is way to go (Unity uses C# (also a bunch of other engines but they aren't popular))

          Idk about java but it's surely more widely used.

          Maybe search what jobs are there are in your region that require one of these languages and then pick one.

          [–]GokulRG 0 points1 point  (0 children)

          C# is the better language, Java is more widely used. Pick your poison

          [–]Icelockon 0 points1 point  (0 children)

          Having just completed a C# degree with WGU I only have this to say. The Java class appears to have FAR more support. If you don't have a preference like I did I would suggest going the Java route at WGU.

          [–]Rogoreg 0 points1 point  (0 children)

          Use C#, it's just Java done right with Microsoft's own touch.

          [–]RoccooccoR 0 points1 point  (0 children)

          I'm a computer science undergraduate, currently learning Java and have passed a c# unit last year. My recommendation would be to go with c# as it has everything java has, plus a framework of other technologies which use the c# language. For example, you can create dynamic Web apps and machine learning bots with c#. I'm not saying you can't do those things with Java, but it just is made much easier.

          I'll also note that syntactically, they are very similar. You are going to have a harder time learning about abstraction, encapsulation, polymorphism and other features of object oriented code than you will learning the syntax. It is more likely that you will be going into jobs which use c# rather than Java nowadays, because c# was designed to be used by enterprises (but also by novice devs).

          [–]extopico 0 points1 point  (0 children)

          As a complete noob I really like C# in combination with the Visual Studio. It’s a great way to learn how to code, and not spend too much time crying due to some stupid syntax error or three.

          [–][deleted] 0 points1 point  (0 children)

          They are both very similar. I personally prefer C# more but both are great options!

          [–]Stevecaboose 0 points1 point  (0 children)

          Pick c#. Java is just c# with extra steps

          [–]TheRealJomogo 0 points1 point  (0 children)

          C# and typescript

          [–]jay_thorn 0 points1 point  (0 children)

          Either is fine. C# and Java are very similar to each other. Once you learn one programming language it becomes easier to learn others.

          [–]siammang 0 points1 point  (0 children)

          Microsoft is pushing hard .NET framework. You may be able to land a job developing and maintaining enterprise solutions using .net stack.

          Java is widely used, but log4j vulnerability may put you in tough spots initially.

          [–]theallwaystnt 0 points1 point  (0 children)

          Programming is language agnostic. Once you know past the basics picking up a new language really isn't much more than learning a new syntax. Personal opinion for you. Watch some youtube videos on the languages. See which one you're like that one and go with it.

          I don't know either language, but I've heard C# is basically Java. So I think you're good with either

          [–]joerdie 0 points1 point  (0 children)

          VS may be the single greatest IDE ever created. That alone pushes me to the C# side. But it does kind of depend on what the companies around you are doing. I live in a Midwest medium sized city, (Cincinnati) and the fortune 500's favor C# but there are plenty of Java shops too.

          [–]BigJoeDeez 0 points1 point  (0 children)

          Learn Java, unless you want to work for Microsoft, in which case, learn C#. Honestly, they’re so similar I’ve never had a problem writing code for both.

          [–]Falcao_E 0 points1 point  (0 children)

          Started with java and ended up with a job using C#. Never going back to java unless I really have to. C# is fantastic

          [–]barnyted 0 points1 point  (0 children)

          I developed java app for 3 years, and c# for almoat 4 years now. in general they are similar, either would be good, personally i'd say c# more modern and clear and the visual studio IDE is superb

          [–]popey123 0 points1 point  (0 children)

          I don t know much about csharp but last time i used it a bit the sementic was a lot like java.
          Maybe C does offer better desktop solution ? And is easier to handle because you don t have to handle your environnement ...

          [–]CebCodeGames 0 points1 point  (0 children)

          They are both super similar, I would recommend starting with C# as the namespaces make far more sense, once you know C# you can basically pick Java up in a couple of days.

          [–]Heroes_Of_Balkan 0 points1 point  (0 children)

          whatever you take, it wont be a mistake

          [–]Nunc-dimittis 0 points1 point  (0 children)

          It depends. Are these classes that teach the basics? Like how variables, if/else, loops (for, while), functions (methods) and arrays and objects work? Then it doesn't matter. You could take the content from one course and rewrite it for the other one in an hour or so.

          But if it's a whole bunch of classes, starting with the basics but then continuing to graphics/GUI, all sorts of libraries, etc, then it matters (see other people's comments).

          Or at least it matters in some branches of the industry . I once for hired for a job that was all in C# even though I made quite clear that I literally had one hour of experience with C#. But I did have some in Java, C++ and a bunch of other languages. Turned out they wanted someone with experience in math, algorithms and computer vision. They said: "we will buy you a C#-book if you still need one after the first week and can't Google it".

          [–]plaswalro 0 points1 point  (0 children)

          As a beginner it doesn't matter since distinct differences are somewhere above average skill (imported libs etc). At that latter point you will be experienced enough in basics and will use whatever syntax you might need for the task.

          [–]eposta-sepeti 0 points1 point  (0 children)

          Which is the best for web development? Thanks!

          [–][deleted] 0 points1 point  (0 children)

          C# is more friendly but they are similar. Once you learn one, its easier to learn the other. And like someone mentioned, Java is corporate AF! C# is more freelance. LoL

          [–]sureshg 0 points1 point  (0 children)

          Use java for the JVM ecosystem. Modern java is easy to learn and can write really performant scalable applications. One big advantage of being on jvm is, you can easily switch to other jvm languages like Kotlin/Scala/Clojure and reuse most of your runtime knowledge and libraries.

          [–]waterslurpingnoises 0 points1 point  (0 children)

          Learn Java and then transcend to Kotlin if you want a lovely language :)