Should I stop learning java in favor of C?
Posted by Time_Reference_479@reddit | learnprogramming | View on Reddit | 31 comments
Hello everyone,
I just started learning programming with java a few months ago, I know the basics and started doing some practices but today I talked with a cs university teacher and told her what I do, then she said that java is difficult and I should instead learn C as a base like in the university but I feel like I already started being confortable with java.
So, what should I do?
brinza888@reddit
You definitely should NOT stop learning Java just to learn C.
You definitely should learn C sometimes.
Learn C when you will be able to get job on Java.
Rain-And-Coffee@reddit
I have learned \~10 languages (Java, Kotlin, JS, Rust, Python, Go, C, C++, Assembly, Ruby, etc).
Every language teaches you something slightly different,
C is great for low level stuff, Java is really common for enterprise web apps.
edave64@reddit
Also, while every language can teach something different, the foundations are the same everywhere.
Learn to program in whatever is most convenient. The way how you solve problems and much of the structure carries over.
So you shouldn't sweat to much about the choice of language.
Emotional-Tiger8457@reddit
both good tbh
8Erigon@reddit
I think you can start with both (really doing something with the language is something different)
So if there is no need to switch, then don‘t. Only if the professor can only help you with C.
chiliPismysignature@reddit
the only thing thats "difficult" about Java is how overly verbose it is. Memory allocation in C is a whole other beast. Java does all that for you. Just do what works for what you're interested in.
gm310509@reddit
As someone who uses both extensively, I would say that Java is easier than C/C++.
At the end of the day, the syntax is similar, but Java is newer and IMHO, cleaner than C.
While it could be said that the number of reserved words you need to know is less in C as compared to Java, there are some concepts - and I'm thinking of pointers here - that many people seem to struggle with. Java doesn't have pointers, it has references, which are typically much safer and easier to use then pointers are.
STEM_Dad9528@reddit
Java is much more widely used now than C. Java also does its own memory management and garbage collection (if I recall correctly), while in C the programmer has to account for all that explicitly. C is also more challenging to with with pointers, in my opinion.
Java also has a lot more libraries (i.e. collections of code that you can make use of, to make your job easier) than C does.
C might be the common ancestor for many languages, but it may be easier to switch from one modern programming language (like Java) to another related one (like C#), without having to go back to C as the foundation.
That's like how you wouldn't have to learn old English in order to learn cockney slang.
my_password_is______@reddit
of course
Xeripha@reddit
No
CriketW@reddit
Stick with Java for now. You're already comfortable with it. C teaches you memory management but that's not necessary for a first language. Learn C later if you need to. Switching now will just slow you down. Finish what you started.
opentabs-dev@reddit
stick with java for now. switching every time someone tells you a different language is "the right one" is the actual trap — you'll spend a year half-learning four languages instead of getting good at one. once you can build real things in java, c will take you a couple weekends to pick up the syntax, and the pointer/memory stuff is much easier to grasp when you already know how to program.
throwaway6560192@reddit
If it's going well, there's no reason to abandon and start over with another language.
Everyone has opinions on which language to learn. You can't possibly accommodate all of them, so pick a reasonable-enough option (Java counts) and if you can work with it then do that.
Select_Mobile4165@reddit
if you're already comfortable with java, stick with it tbh. constantly switching languages early on is a bigger problem than choosing the “wrong” first language
Astronaut6735@reddit
With C you'll need to learn memory management and pointers. With Java you'll need to learn Object Oriented Programming. You can learn the basics of programming on either of them. At this early stage in your learning path, the language choice isn't super important. You can learn the fundamentals in any popular language. I'd recommend sticking with Java because you're comfortable with it. The biggest risk to your learning right now is you getting frustrated or confused by jumping between languages, and giving up.
SteveLorde@reddit
No, learn an employable language unless you are dead set on working in low level language environments
Typescript for web frontend
C#, Java, Typescript or Python for web backend
C++ for general low level
ok_dude_2022@reddit
Don't drop Java mid-learning just because a teacher suggested C. That's going to reset your progress for no immediate gain.
That said, the teacher isn't wrong that C gives you a better mental model of how memory works, how the stack and heap behave, why certain operations are expensive. That understanding carries over to Java in subtle but real ways — you start reading your own code differently.
The more practical path: stick with Java until you're genuinely comfortable, then pick up C as a second language to deepen your understanding. Switching now would mean you end up half-competent in both instead of solid in one.
MR_LAW11@reddit
Honestly, if you’re already getting comfortable with Java, I wouldn’t suddenly switch just because one teacher said so. Java is completely fine as a first language and a lot of programming fundamentals transfer anyway, loops, functions, problem solving, data structures, etc.
C is great for understanding lower-level concepts and how things work under the hood, but that doesn’t mean you must start there. I’d probably keep going with Java until you feel solid, then maybe learn some C later if you’re curious. Restarting every time someone recommends a different language is an easy way to never get good at any of them.
dyslechtchitect@reddit
C is an incredible language. Learning it deeply and building real programs with it gives you a fundamental understanding of how computers actually work. The challenge is that once you become accustomed to higher-level languages, it can be harder to appreciate why C matters so much. If you have the opportunity to learn it early, absolutely take it.
TalentShift@reddit
You can learn both since it looks better on resume. My approach is to never stop learning new things regardless how hard they are.
Least_Chicken_9561@reddit
no, if you want a job then Java is better than C. for learning purposes learn both, first Java and then C or vice versa, don't learn both from scratch at the same time otherwise you will feel overwhelmed.
huuaaang@reddit
At this stage OP should not be thinking about choose a language for a job. By the time they graduate they should be familiar with a few languages, IMO. Now is not the time to specialize. What we're talking about here is just a stepping stone. Like nobody should have dissuaded me from learning BASIC so many years ago.
Own_Age_1654@reddit
Very odd thing for your professor to say. I have never in my life heard anyone describe Java as hard to learn, much less harder than C. Higher-level languages like Java are typically easier to learn than lower-level ones like C, in the same way that C is easier to learn than assembly, and assembly is easier then machine code.
You should learn Java, .NET and friends if you want to work in an enterprise setting. Application containers, frameworks, middleware, event buses.
You should learn C and friends (quite possibly Rust, in particular) if you want to do low-level code where being close to the bare metal and having maximum speed and control is important. OS stuff, security, hardware, etc. But never in a millions years because it's "easier". WTF?
desrtfx@reddit
Keep going with Java for now.
Build projects, not copy-tutorial projects. Take inspiration from a tutorial and create your own version if you must.
That "everybody needs to learn C to understand programming" stance is just plain gatekeeping. There are more than enough very successful and good programmers that have never touched C and will never touch it.
Yes, you can absolutely learn a lot from learning C. Is it strictly necessary? No.
high_throughput@reddit
Either you're missing some context and intention, or this person is full of shit. Java is significantly easier to deal with than C.
peterlinddk@reddit
That is a bit like if you are learning Italian, and someone suggest that it is difficult, and you should learn Latin instead, as that is the base for most languages ...
I agree that everyone should learn C at some point in their career, but if you like Java, stick with it. You'll get to like having Strings and classes and garbage collection and all that. If at some point you'd like to go deeper into what goes on beneath the nice helpful runtime, you can try some C.
The base language is the same - if, while, for, int, void, return and all that, but you can structure your code in so many different (better?) ways with Java, and you'll never have to worry about hexadecimal addresses and pointer arithmetic!
HashDefTrueFalse@reddit
C is Java with pointers, minus several useful language features, decades more historical warts, a less feature-full easy to use standard library, and even professional programmers shit themselves at the thought of reading the standard to understand all the things that you can express in the language but cannot rely on the compiler to produce or the hardware to be able to do.
C is my favourite language to write, but this is not the reason to learn it. It's not that much more difficult than Java at the very beginning, but it's much more difficult to be good at writing in C than in Java, IMO.
NeedleArm@reddit
C will bring you into a niche low level programming market. Low/decent pay, also works with hardware and firmware. Its rewarding if you enjoy the combination of hw/sw rathe than sw
ProjectMarworyn@reddit
I don't think difficulty is a good reason to language hop early on.
When you're starting out I think you should stick with one language and het comfortable with the basics.
pseudo-segfault@reddit
Learn the basics of programming with Java, then when you get comfortable with the try some C and learn the basics of memory management in contrast with javas garbage collection
AMajoris@reddit
Learn both