Learn Java Before C# ?

So my question is would be learning Java first to understand programming be a good idea before I jumped into learning C#? I have tried following tutorials and paying for courses to learn C# but they only seem to cover basics like if statements, functions, and variables etc. leaving me still confused and not exactly knowing what I’m doing. These so-called tutorials are just having you for the most part typing in code with no real explanations…and I stay confused no matter how many times I re-watch the videos. I feel like I should fully understand programming concepts before trying to build a game. Anyone can copy and paste but I actually want to understand why this and that works and how too make something I want come to life

This is the course I am using to learn java https://www.udemy.com/java-the-complete-java-developer-course/learn/v4/content it seems to cover all the concepts o And I read Java and C# are pretty similar so I would be able to easily translate what I learned from the Java course to C#? And for the C# and unity I have a course (https://www.udemy.com/unitycourse/learn/v4/overview)that will teach how to make several games and I know unity has tutorials on C# but they seem to be tutorials that expect you to already know programming concepts already. My end game goal is to really be able to make games in Unity but I feel like knowing Java would benefit me in other ways because I do want to be a programmer as a career but I read its almost impossible to get into the Game Development field with out a college degree and I don’t have one. I’ve been working my ass off to try to afford to go a college but lets be honest its not cheap. At least with Java I could possibly learn Android Studio and be one of the lucky ones to get a job making Apps and have game development as a hobby.

What are you guys thoughts?

I don’t think you have to learn Java if your real objective is to be competent with C#. As you justly said, they are very similar languages, which means it’d take minimal time for a Java developer to learn C#, but it wouldn’t help one to learn it any faster either, compared to a case of learning C# from the beginning.

If you want to pursue a career as an enterprise software engineer, or an Android developer though, it might make more sense to learn Java. But the market is slowly shifting away from Java to favor such languages like Javascript or Kotlin.

Of course, Java will stay in those fields for a long time to come. But if you want to broaden your perspective as a developer, learning two very similar languages might not be an ideal way to do it, especially when one of them is showing signs of decline.

Rather, learning something completely different from C#, like Kotlin, Scala, Python, Javascript, and etc as your second language might be a better choice, in my opinion.

2 Likes

I would much rather learn just C# as I find myself getting completely bored while learning anything that isn’t related to game development but I just don’t tend to grasp the C# from any videos I watch. I originally started my path in programming learning HTML and CSS in high school and then I did some JavaScript on Code Combat and found out about Phaser and started messing around with that followed some tutorials and made like 6 or 7 real basic games that weren’t pretty too look at all lol. But people told me that I should learn a more OOP programming language first like C# so I can better understand programming. How ever I can’t seem to find a course that is like the Java one I linked that seems to go over every concept. So I actually understand. For example I made a game in Unity something basic just like a text adventure game and we used Enumeration in the tutorial but I have no idea what that is and there was no explanation of it within the section of the course. I thought Java would be good to go with not only because of the video but because Android Studio uses Java and Mobile seems to be a good place to develop for. Plus I read LibGDX can also make games. Although it seems to not even come close in comparison to Unity.

I have dabbled in Unreal Engine, Game Maker Studio, Corona SDK, and Phaser. But my honest knowledge doesn’t pass the basics and I still get confused quite a bit. But I feel besides lack of practice its really lack of understanding the concept of certain programming topics

Learning a programming language by watching videos is hard, no matter what language you choose. You’ll need a bit of practice to learn the basics of any language, and it generally requires at least a few years to become really proficient, if you are not already familiar with the paradigm.

And if, for example, you come up with some new concept like IEnumeration as you said, the first thing you might want to do is to look up the reference documentation (MDSN, if it’s C#) and try to understand what is the purpose and meaning of the said class or interface.

And if you encounter more new concepts while reading the documentation, you can either search them up on internet, or read relevant sections of the documentation. Personally, I found it to be a much better way to learn new language than watching any videos.

I’m not claiming that my method to be the best possible approach to become a proficient programmer. But if you are already struggling with learning C# by watching videos, I suppose you might want to try different approaches.

C# has been competing with Java for quite a long time, so I’m sure there’d be quite many freely available learning materials on internet, aside from such videos you mentioned.

2 Likes

There’s a course over on Udemy (learn to code by making games). Went through it last summer, thought it was pretty good. Granted, I started completely fresh with almost no prior experience. Still it takes you though multiple games and at the very least gives you a foundation to branch off.

Oh, and btw. they run sales all the time, usually at 90% off.

I have this course as well I am about up to the brick breaker tutorial now but there are things in there they don’t even go over. So sure I make the game but idk what I’ve done really.

It’s not so much I am totally struggling from watching videos. I think I do in fact understand the basics but as for advanced topics I feel they are totally skipped over. Like they will metion what something is but then say we will cover that in a later lecture or we won’t cover it at all, so then im left thinking why even use it? I have tried other resources like Codecademy and sololearn on my phone, even reading books and tutorials etc but watching someone do it and then it explaining it and me trying to go over it with the video paused seems to be the best way I choose to learn. I do understand though that a lot of videos are from people who aren’t actual teachers so the way the teach isn’t always the best.

Java is harder in my opinion than C#. Back when I first learned the language, which was in the Java 2 days, getting anything working required jumping through more hoops than it did with C#. Building the user interface for an application with C# was a matter of click-and-dragging components but with Java everything had to be done in code.

If you’re having problems learning C# then I can’t help but imagine you’ll have a worse time with Java.

How about trying a book instead? The C# Yellow Book is a free ebook used at educational institutes for first year students.

http://www.csharpcourse.com/

Alternatively, or additionally, you could try starting with the Unity project tutorials. They will teach you the basics of C# while teaching you how to develop games with Unity.

https://unity3d.com/learn/tutorials

3 Likes

I’m kind of in the same boat. Just learning C # with no real computer experience beforehand. I went through multiple tutorials and felt like i wasn’t really getting anything – but I was. Just keep at it, try out lots of different videos and teachers. For me, the ones that really kind of jumpstarted things for me was the C# for Absolute Beginners videos from Microsoft Virtual Academy. They are free.

I’m still frustratingly bad at it (after about a month of studying), but at least now I can create simple scripts that function from my own imagination and I can read more complicated scripts and kind of understand what is going on.

Just keep at it. That’s my wifes advice to me and it has really helped. Don’t worry if you feel like you are lost. You are still learning, just like if you flew to a foreign country and nobody was speaking a language you understand. Just keep paying attention and trying to learn and eventually you’ll start to get it.

2 Likes

Get yourself a free copy of The Yellow Book, and be happy. :slight_smile:

There are many issues with tutorials on the Internet. There’s good stuff out there, but there’s also loads of useless stuff, and the people who need tutorials are in the worst position to tell a useful one from a useless one.

Edit: Also, I’ve said this a bunch of times, but “learning programming” and “learning Unity” and “learning game development” are different things. You can combine the learning of them since there’s often overlap, but I personally believe that shoehorning every lesson into a game context makes some things harder to learn.

3 Likes

No. Also “learning C#” is a bad idea if you only want to use unity engine.

It is like saying “would it be a good idea to learn to swim before learning to ride bicycle, and learn to skydive before learning to swim?” or something.

Unity uses C# as a scripting language, and you can pick up quite a lot by working through tutorials.

Basically, start with unity. Pick up missing information as you go. If you’re still missing something, THEN go for the books.

If you were aiming for normal application development, you’d start with books, but if your goal is to use the engine, investing into proper C# is not worth the time.

1 Like

If you just want to dabble a bit with Unity feel free to just jump right in, but if you intend to become a career programmer I would strongly suggest you take the scenic route.

The programming language you start with (almost) doesn’t matter, either Java or C# would probably be a decent pick. I suggest you stay away from Javascript for now, though, it’s actually pretty difficult to fully grasp. What you should try to learn are the fundamental concepts of a programming language (like Objects, Classes, Functions etc), and get a really good understanding of that. You’ll find that they are pretty much identical in most programming languages out there. Learning an environment like Unity or Android is a task in and of itself, and if you still struggle with the fundamentals it will be much harder than it has to be. It’s like trying to run before you can walk.

Worst of all, it could train you in the habit of using code that you don’t quite understand (like copying stuff from tutorials that you just assume to do something, but you don’t really know for sure), and it can be much harder to untrain months or years of wrong assumptions than to learn it properly from the start.

I know it sounds boring as f, but your best bet might be to just stick with console programs for a while. This way you can focus on the language itself, without being bamboozled by complex APIs and SDKs, full of their own idiosyncrasies. Pick up a decent course or book for the language itself (avoid things like “Learning Android in 2 Weeks!!”, and make sure it contains lots of exercises, because you can’t learn programming without writing code) and after that, find a decent book about programming patterns (yes I know, how boring, but trust me, you’ll need them).

You don’t necessarily have to go with the big bibles, as a matter of fact the “Head First” books are pretty decent and try to make learning as fun as they can.

If you want to become really good at your craft, take an excursion into more advanced concepts, like memory management (heap vs stack), threading, networking and even some compiler theory (don’t have to be able to write a lexer, but understanding how a VM works and how it turns all that magic C# fairy dust into actual byte code is tremendously helpful). You won’t need that to get a basic game running in Unity, but if you want to ship a decently advanced game, chances are you’ll burn in a blazing fire without understanding that stuff. It’s just not enough to trust C# to do the right thing here, because it won’t. As a matter of fact, the assembly and compiler theory courses I took in college have proven to be the most enlightening ones in my entire career.

You mentioned wanting to go to college, and chances are, this is would exactly be how they would teach you. I know there are also colleges out there that try to skip fundamentals because they’re afraid to bore their students, but personally, after being a career programmer for more than a decade and having worked with pretty much every programming language under the sun, this is what I would advice you.

It’s been a while since I last touched Java. From memory there isn’t much in the difference between the two languages. So unless you have a use for Java, learning it is a waste of time.

I learned Java first, in the year 2000.
When I started with C# for Unity I read a one page explanation on MSDN about the differences and in 1 day I was sorted out. You still need the reference material for the exact commands, but it was really nothing to shift over.

Learn C# if you want to be any good at Unity.

3 Likes

No reason to learn Java unless you have a specific project that uses Java.

2 Likes

As others have said, you should probably learn from reading a book. Books are divided by chapters and teach you one concept at a time. Usually, if you find a college book, they have homework at the end of each chapter as well.

One of my professors told me this:
If you want to learn code, you have to write code.

You’ll know that you’ve learned Unity C# when you can open up Unity, type up a script, and make something function without having to reference anything at all. That should be your goal. You can watch videos all day long and copy paste bit by bit, but if you aren’t typing your own code and experimenting, you aren’t learning.

This is a myth. Even the most proficient developers work with the scripting reference open. Between the Unity API and the .NET framework, there is far too much stuff to memorise.

4 Likes

The reason you need to learn C# to be good at Unity, is because all the support materials are now in C# and the open source components, now and in the future are also in C#.

Plus you might have fun in jetbrains rider if VS isn’t an option :stuck_out_tongue:

Yeah, after years I’ve managed to get a good handle on .NET (at least, the version Unity uses) but I keep the scripting reference open a lot of the time. Less so now that I’ve switched to visual studio though. That overload preview is nice.