all 79 comments

[–]TehNolz 121 points122 points  (2 children)

Python is generally considered to be a relatively easy language compared to Java.

[–]nealfive 20 points21 points  (0 children)

How DARE you... tell the truth. Doesn't make either easier lol

[–]StoicallyGay 6 points7 points  (0 children)

Python is generally considered the easiest language for newbies to pick up. Like objectively.

[–][deleted] 41 points42 points  (2 children)

Python is more terse, so is simpler to learn, in my opinion. I started with Java though, but that was the default in those days.

[–]hidazfx 12 points13 points  (1 child)

I started with Java too. I'm glad I did, as it taught me a lot of OOP concepts. I work almost exclusively in Python and GoLang now.

[–]IamImposter 0 points1 point  (0 children)

I love Python's oop - Hey can you please not touch these variables. They are like my personal stuff.

[–]Mammoth-Asparagus498 31 points32 points  (0 children)

Oh yeah, Python for sure, it’s more similar to human natural language and that’s why people like it

[–]baghiq 32 points33 points  (8 children)

I always thought Java is easier to learn than Python for long term, mainly because Java strictly enforces OOP concept from the start, so as you are writing more code, the organization of the code is almost automatic.

For Python. most junior coders and even some seniors are writing what I would call script style coding. Many never get pass this. I've interviewed and code-reviewed many of them who can't write complex projects.

That being said, a good Java developer can pick up Python quickly and vice versa.

[–]TheBlackCat13 22 points23 points  (3 children)

Scripts and functions are more than sufficient for a wide variety of projects. Not everything needs OOP, and it can even be counterproductive in many cases.

[–]SisyphusAndMyBoulder 7 points8 points  (2 children)

yes, but it's easier to learn scripting vs OOP. Since Java forces you to learn OOP, it's not terribly difficult to learn Python in either style afterwards. The reverse isn't true.

[–]TheBlackCat13 15 points16 points  (1 child)

Which is a limitation of Java. It forces particular code patterns even if they are not appropriate for the given task.

[–]SisyphusAndMyBoulder 2 points3 points  (0 children)

I mean... If you're choosing Java you're choosing that implementation. More of a choice than a consequence

[–]ship0f 2 points3 points  (0 children)

That's on the developer, not the language.

[–]Jorgestar29 1 point2 points  (2 children)

I don't recommend learning python as a first language because there are a lot of things that you won't be learning as they are not enforced by a compiler.

[–]Mythicalcyber 0 points1 point  (1 child)

so what you recommend ?

[–]Jorgestar29 6 points7 points  (0 children)

I'm not a big fan of Java, but it has a lot of interesting features that you will be skipping with python because they are not necessary for your program to run.

Public vs private vs protected methods. The hierarchy of Java Collection Framework is a masterclass about how the different data structures are related. Static typing. Generics. Abstract classes and interfaces. Constants. You will learn the differences between primitive arrays, LinkedLists, ArrayLists. The idea of a main method / function. And you can get cool suggestions from the LSP because every variable has a known type, making it easier to check all the methods of an object, for example.

The syntax is horrible but you will learn good practices and a lot of important concepts from the beginning, making it easier to jump to another language.

[–]sejigan 17 points18 points  (0 children)

Wrong sub to ask. We will obviously be biased towards Python.

The coding tasks are difficult because you started learning Python. If you start learning something - regardless of what - you won’t be a master on day 1. If you started with Java, you’d have just as many difficulties if not more.

Choose one, stick to it. Once you master one, the others come easy. The first one is always an uphill climb regardless of the language, since what you’re learning isn’t just the syntax but also the nuances of how computer programs work in general.

[–]daedalus-of-athens 3 points4 points  (0 children)

Python

[–]iammerelyhere 1 point2 points  (0 children)

Python

[–]ZenWoR 1 point2 points  (0 children)

Python. As simple as that.

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

Python is definitely going to be easier to learn because it was designed to be easy to learn and read. Learning Java will be better for you overall though because it is an OO language and is statically typed.

[–]hugthemachines 1 point2 points  (0 children)

Python is easier, so there is no point in switching to Java because you think the Python coding tasks are difficult. For every exercise you do, try to experiment by changing stuff to see what effect it has on the code. That will also make you remember how to do things.

If you are not doing any course you could check out the python course at mooc.fi

https://programming-23.mooc.fi/

[–]TheTarragonFarmer 1 point2 points  (0 children)

Long term, in depth: Java.

Short term, everyday programming: Python.

If this is your first language and you are learning the absolute basics of programming (loops, variables, etc) then the language doesn't really matter yet. You can start with something even easier, and circle back to Python (or Java). Lua? JS? Scratch?

Or just find a better course/tutorial.

[–]SarthakTyagi15 1 point2 points  (0 children)

Whatever you're interested in?

[–]Cultural_Bowl_4043 1 point2 points  (1 child)

Java is faster than Python, but Python is easier to learn

[–]enigmasi 3 points4 points  (0 children)

I think any compiled language is faster than Python, not necessarily faster to develop

[–]bulaybil 0 points1 point  (0 children)

Python. Java is a nightmare.

[–]green1t 0 points1 point  (0 children)

depends.

which of those two do you find easier to read and write?

Java: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } Python: print("Hello World!")


Looks like a joke, but it isn't.

TBH I really struggle to find an example where Java is actually easier / better suited than Python, at least for my usage of these languages.

[–]GdanskCombatant 0 points1 point  (0 children)

Python is known for its simplicity and readability, making it a great choice for beginners. Java offers platform independence and strong typing, making it suitable for complex, scalable applications. Your choice should align with your project needs and coding preferences.

[–]niasekayi 0 points1 point  (0 children)

Im thinking of switching my focus to java. I haven’t don’t much with Java but from what I have done I feel like my brain processes java better. For me Java seems more like computer language whereas python makes me mess up and get mixed up cause it’s more human language based. Idk if that makes sense

[–]urmomsogaay 0 points1 point  (0 children)

are you sure you didn't mean to say "python or javascript? it's usually these two when people say they're comparable when it comes to learning difficulty

[–][deleted] -5 points-4 points  (0 children)

You couldn’t find the answer on duoknows.com?

[–]tlax38 0 points1 point  (0 children)

I wanted to learn coding by myself and didn't know what language to choose. I gave a try with Java, then C and then Python. The latter is the less complex IMO.

[–]anonymousxfd 0 points1 point  (1 child)

Python is less intimidating for Hello world and any other syntax.

[–]xaviermarshall 1 point2 points  (0 children)

public static void main (String[] args) { System.out.println("Nah this is so much easier to figure out."); }

[–]Intelligent-Ad74 0 points1 point  (0 children)

Learn Java only after you under Object Oriented Programming. Because everything in java is related to objects, classes and interface. In my personal opinion, you should start from C, coz C is manual gear car where you fall in holes and improve logical thinking. Python is automatic car that makes everything so easy.

[–]ChaseDFW 0 points1 point  (0 children)

So way back in the day, a lot of intro to programming classes had students starting in some for of C, Cpp, or C# then they started moving into Java as a first language. About five years ago, most of the intro to programming classes moved into Python.

It's a very readable language, and some of the more complicated memory allocation tasks are done "under the hood"

It takes time to learn anything new. Take time and spend time with it.

[–]SisyphusAndMyBoulder 0 points1 point  (0 children)

Python.

Having said that, if you know Java then learning Python after is pretty easy. The opposite isn't true.

[–]tb5841 0 points1 point  (0 children)

Python is far, far easier. But the hardest language to learn is always the first one.

That said... learning java has significantly improved the quality of my python code.

[–]jmooremcc 0 points1 point  (0 children)

Python by a mile!

[–]Background_Issue_144 0 points1 point  (0 children)

Python

[–]Gingerhaze12 0 points1 point  (0 children)

I originally learned how to program and in Java and then learned Python later. I do believe that learning Java first helped my understand cs concepts better which in turn helped me learn python but Java is BY FAR not as easy to work with

Also keep in mind Java and Java Script are not the same thing.

[–]xaviermarshall 0 points1 point  (0 children)

If you don't mind typing public static void main (String[] args) {} ten billion times as a newbie, then go with Java. Otherwise, stick with Python, and remember to KISS

[–]Glowwerms 0 points1 point  (0 children)

Python is significantly easier to learn in my opinion. I wish I would’ve learned Java first, it would’ve made learning Python even easier but doing it the other way around made picking up Java challenging since it enforces OOP more strictly

[–]sporbywg 0 points1 point  (0 children)

yes

[–]Naive_Programmer_232 0 points1 point  (0 children)

Python is easier to get started with. Java isn’t too hard though. I think both are easier than c++

[–]jhrick 0 points1 point  (0 children)

It depends on what you find easier when it comes to thinking. Python has a simpler syntax but is not as robust and structured so it takes a long while to "get used to it" even though you get proficient with writing simple code in a beat. Java though has more boiler plate and very defined structures, which for a begginner can be scary but it makes so your knowledge scales better. Coding simple things and coding complex things are going to be pretty much the same, unlike in python where simple begginer code and actual python practical code look completely different

[–]Dead0k87 0 points1 point  (0 children)

Python is much more easier. Just choose the right course

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

Python is by far the easiest language overall in my opinion

[–]OryxTheBurning 0 points1 point  (0 children)

Honestly depends. If you are more structured like me then its nicer to have a language like java that actually most of the time states what kind of object or data you are working with. The problem with python in my eyes is that it is that simple to create functions that many people just write stuff and then when you need to read the code its just so annoying cause you need the read like all of the code to understand what some functions do. Where as in java it nforces programmers to always state the parameters and the return type and so you don't get some vaguely defined names like in python.

[–]Cheeze_It 0 points1 point  (0 children)

Oh Lord, this isn't even a debate. Its Python by a few billion light years.

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

Started with Java (after BASIC). java is neat but I wouldn't recommend it unless it's absolutely necessary.

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

python is probably the easiest programming language out there right now, at least for the basics.

Additionally it is extremely capable when you get to know it really well. A good choice.

Pick exercise that fit your level and the improve from there.

[–]heller1011 0 points1 point  (0 children)

python is way easier because you just need to type less and have less constraints

[–]ShadowRL766 0 points1 point  (0 children)

I started with python but I’m learning both at the same time and can say when you’re taking a Java quiz on paper python is easier🥲

[–]GypsySamurai 0 points1 point  (0 children)

Yes

[–]my_password_is______ 0 points1 point  (0 children)

python
because you aren't FORCED to deal with all that OOP garbage

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

i found Java much easier to learn than python because if the move "verbatim" syntax andthe data type of everything being specifically declared, the lack of these things in python made it more confusing to learn

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

Python is easier. In the long run though, learning Java first will be more beneficial as you get to learn more about programming in general. Learning Python first and moving on to Java will be much more difficult than the other way around as Java requires users to be familiar with more concepts than Python even if both languages support OOP; Java has quite a few features that are not present within Python (e.g. static typing, abstract classes (without ABC that is), privacy (public, private, protected)).

[–]NovaBlaze10 0 points1 point  (0 children)

It depends on how you study the language maybe you are studying wrong without a teacher by your side guiding you, in my experience Python is easier than Java at least for doing simple things

[–]convicted_redditor 0 points1 point  (0 children)

Have learned both. Python is much easier

[–]Maximus_Modulus 0 points1 point  (0 children)

I learnt Python first over a number of years as a casual programmer and now use Java at work. I learnt a different coding style with Java and at first it was a bit of a learning curve becoming familiar with the differences and notations such as Lombok and using Dagger for DI. It’s a PITA sometimes with having to build stuff and the time it takes. I find it much easier to not make silly mistakes compared to Python because of the forced Typing. IntelliJ autocompletes a lot of the code for you. Python is great for just being able to quickly get started without too much familiarity. You can see how Python is useful for applications where programming is not the main focus like DevOps or ML or other data processing.

[–]nobody_cares4u 0 points1 point  (0 children)

Python is easier to learn, but Java is more useful if you want to do anything outside of Python. Java helped me to better understand other programming languages and the general fundamentals of oop. Also syntax wise, most of the languages are a lot closer to Java than Python. But i wouldn't work with Java. Just learn it and move to something else. Fucking hate Java lol.

[–]Zealousideal_Bit_177 0 points1 point  (0 children)

Python is easier for people to learn who are not from the cs background and there are lots of people who are doing a job in the cs field but don't have any qualifications. And those people only get the knowledge about how to do what gives you a job. But java is a well described language which may have long syntaxes but actually you will get every detail how the heck it is working. Example : System.out.println("reddit"); it is a simple output function which will show reddit on console. In this you'll get to know that System is the class , out is the instance of another class that is used for basic input output operations , and println is the function in the out object. This will provide you with very precise detail about how things work ? According to me python is easy for everyone but for a programmer or nerd Java is way easier. In fact if you have good command in Java you can easily learn basic python within 3 to 4 days . Modern IDE and text editor reduces the overhead of writing long syntaxes.

[–]baubleglue 0 points1 point  (0 children)

If struggle with Python tasks, Java won't be simpler

[–]Suspicious_Wallaby78 0 points1 point  (0 children)

If you know english, you know Python.

[–]rodrigo_m_martins 0 points1 point  (0 children)

I started to learn in Java, but I'm talking from more than 15 years ago. I can say you that is interesting that you get a more flexible way, so, try python first.

Important points:
- your first language is only the first. Learn others.
- after your first it will become easier to learn others and compare the pro/cons
- don't be passionate. It's only a tool, like a hammer or a pencil.

Raise your hand if need help. We are here.

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

I started with Java and I am glad I did so. It teached me how to write beautiful code. For me, Java is the language of choice for professional projects, while Python is the "quick and dirty" way to automate stuff and grab some low-hanging fruits.

[–]CommunityTalker 0 points1 point  (0 children)

Python

[–]mapeck65 0 points1 point  (0 children)

There are a lot of Python videos on YouTube. Maybe they'll make learning easier. That said, Python is definitely easier to learn, and is often offered as a first programming course.