No, learning any programming language before Java will make learning Java easier. Answer from ectomancer on reddit.com
🌐
Reddit
reddit.com › r/learnpython › java after python.. possible??
r/learnpython on Reddit: Java after python.. possible??
August 8, 2022 -

I have been learning python for a year and I think I can code in python! I just need to work on projects to advance my skills. Lately I have been thinking to learn Java...so I took advice from my friends. They said I will have tough time learning Java because I have learned python before. They said I should have learned Java first and python later... maybe I messed up 😅😅

Is it true? Will it really be that difficult?😩

Python is my first language and I am thinking of learning Java now. Can I?! Please share your opinions

Thanks in advance 🤗🤗

🌐
Medium
medium.com › data-science › rewiring-your-brain-from-python-to-java-383960580098
Rewiring Your Brain from Python to Java | by Dan Hales | TDS Archive | Medium
September 24, 2020 - Rewiring Your Brain from Python to Java Seven conceptual hurdles you might face when learning a new programming language Confession: my personal experience is almost the complete opposite of the …
🌐
Quora
quora.com › How-hard-is-it-to-learn-Java-if-I-already-know-how-to-program-in-Python
How hard is it to learn Java if I already know how to program in Python? - Quora
Answer (1 of 55): This is how you declare a list of strings in Java (before 9): [code]List mylist = new ArrayList (); [/code]This is how how you declare a list of an undefined type in since Java 9 (thanks Bernard Louw for the comment) [code]List anytypeList = Collections.emptyList...
Top answer
1 of 7
26
  • Don't put everything into classes. Python's built-in list and dictionaries will take you far.
  • Don't worry about keeping one class per module. Divide modules by purpose, not by class.
  • Use inheritance for behavior, not interfaces. Don't create an "Animal" class for "Dog" and "Cat" to inherit from, just so you can have a generic "make_sound" method.

Just do this:

class Dog(object):
    def make_sound(self):
        return "woof!"

class Cat(object):
    def make_sound(self):
        return "meow!"

class LolCat(object):
    def make_sound(self):
        return "i can has cheezburger?"
2 of 7
23

The referenced article has some good advice that can easily be misquoted and misunderstood. And some bad advice.

Leave Java behind. Start fresh. "do not trust your [Java-based] instincts". Saying things are "counter-intuitive" is a bad habit in any programming discipline. When learning a new language, start fresh, and drop your habits. Your intuition must be wrong.

Languages are different. Otherwise, they'd be the same language with different syntax, and there'd be simple translators. Because there are not simple translators, there's no simple mapping. That means that intuition is unhelpful and dangerous.

  • "A static method in Java does not translate to a Python classmethod." This kind of thing is really limited and unhelpful. Python has a staticmethod decorator. It also has a classmethod decorator, for which Java has no equivalent.

    This point, BTW, also included the much more helpful advice on not needlessly wrapping everything in a class. "The idiomatic translation of a Java static method is usually a module-level function".

  • The Java switch statement in Java can be implemented several ways. First, and foremost, it's usually an if elif elif elif construct. The article is unhelpful in this respect. If you're absolutely sure this is too slow (and can prove it) you can use a Python dictionary as a slightly faster mapping from value to block of code. Blindly translating switch to dictionary (without thinking) is really bad advice.

  • Don't use XML. Doesn't make sense when taken out of context. In context it means don't rely on XML to add flexibility. Java relies on describing stuff in XML; WSDL files, for example, repeat information that's obvious from inspecting the code. Python relies on introspection instead of restating everything in XML.

    But Python has excellent XML processing libraries. Several.

  • Getters and setters are not required in Python they way they're required in Java. First, you have better introspection in Python, so you don't need getters and setters to help make dynamic bean objects. (For that, you use collections.namedtuple).

    However, you have the property decorator which will bundle getters (and setters) into an attribute-like construct. The point is that Python prefers naked attributes; when necessary, we can bundle getters and setters to appear as if there's a simple attribute.

    Also, Python has descriptor classes if properties aren't sophisticated enough.

  • Code duplication is often a necessary evil in Java (e.g. method overloading), but not in Python. Correct. Python uses optional arguments instead of method overloading.

    The bullet point went on to talk about closure; that isn't as helpful as the simple advice to use default argument values wisely.

🌐
Reddit
reddit.com › r/feedthebeast › how easy is it to learn java after you learn python?
r/feedthebeast on Reddit: How easy is it to learn Java after you learn Python?
November 15, 2017 -

I just started a class today and found out i will be learning Python, how easy is it to transfer my skills into modding minecraft, Assuming I do well and actually learn to code in Python?

Note: I have never coded before, sorry if this is a noob question.

🌐
Team Treehouse
teamtreehouse.com › community › is-it-easy-to-learn-java-after-your-learned-python
Is it easy to learn java after your learned python? (Example) | Treehouse Community
February 2, 2018 - The good thing about programming is the logic behind programs is always the same across all languages, it's the syntax that differs. So in my experience once I knew one language I picked up others in about the same amount of time. I guess it would matter on how quick of a learner you are, but I can tell you Java is a bigger beast than Python.
🌐
Runestone Academy
runestone.academy › ns › books › published › java4python › index.html
Welcome to Java for Python Programmers — Java for Python Programmers
Java for Python Programmers · Preface · Introduction · Why Learn another programming Language? Lets look at a Java Program · Java Data Types · Conditionals · Loops and Iteration · Defining Classes in Java · Naming Conventions · Common Mistakes · Java Documentation ·
Find elsewhere
🌐
Aryaboudaie
aryaboudaie.com › java › python › technical › educational › 2017 › 11 › 13 › python-for-java-programmers.html
Python for Java Programmers - Part 1 - The Big Picture — Learning Python as a Second Language » Arya Boudaie's Personal Site
November 13, 2017 - The way of becoming good at programming ... of Java, then one semester of Python, etc… Rather, when you learn one language, it should be fairly easy for you to pick up another one, or at least easy as learning your first one was. Additionally, learning another language should serve some purpose (I’ll give you some reasons why you should learn Python), but don’t think that after this, you ...
🌐
Medium
medium.com › javarevisited › is-switching-from-python-to-java-is-a-good-idea-86a3b81f3475
Is Switching From Python to Java is a Good Idea? | by John Selawsky | Javarevisited | Medium
April 25, 2023 - However, knowing two languages is always better than one. If you are thinking of learning a second language after Python, Java could be a really nice choice.
🌐
Quora
quora.com › Knowing-Java-how-easy-is-it-to-learn-Python
Knowing Java, how easy is it to learn Python? - Quora
August 31, 2014 - Answer (1 of 4): You should become comfortable with the syntax in a few weeks. You may require a year or more to write idiomatic Python; while this may make you less productive or more prone to stumbling, this will not prevent you from accomplishing ...
🌐
Python
wiki.python.org › moin › MovingToPythonFromOtherLanguages
MovingToPythonFromOtherLanguages
You can define a function, and call it with anything you want, but if it has to behave differently for different type operands, you have to use the run-time type identification type function explicitly within the single definition of the function. Default arguments to functions are just as powerful a tool as in C++. Actually polymorphism does work as expected, it just doesn't require deriving from a base class as in C++ or Java.
🌐
Reddit
reddit.com › r/learnpython › is it bullshit: know java, easy to learn python. but not the other way around.
r/learnpython on Reddit: Is it bullshit: Know Java, easy to learn Python. But not the other way around.
August 11, 2019 -

Hello people, I am looking to learn a programming language during the summer before college. The classes I'll be taking at univerisity uses Java. However, I've been trying to learn Python on my own for around two weeks using Automate the Boring stuff and Code academy. So I am still a noob. However, I've read some posts where people say learning Java as a first language will be much better than learning Python as a first language because it is easier to transfer from Java to Python but not the other way around. Now I am conflicted in which language I should devote myself to for the rest of the summer. Please give some advice. Thanks!

Edit: Thanks to everyone who replied and who tried to help. So some said that Python allows you to skip the useless code which therefore allows you to focus more on the concepts. While some said that Java forces you to explicitly write out all the steps which teaches you more on the fundamentals. Although I will eventually be learning Python as I am interested in Machine Learning/AI I think I will be learning Java for the rest of summer until university starts simply because of the fact my classes uses Java so I was think about getting a slight head start. Once again, thank you to everyone who helped.

🌐
YouTube
youtube.com › watch
Learning Java after Python - "Hello, World!" - Comparing a Simple Program Structure - YouTube
The first tutorial in a series that helps you translate your knowledge of the Python programming language to basic familiarity with the Java programming lang...
Published   December 30, 2020
🌐
Medium
medium.com › @trungluongquang › java-and-python-which-is-better-to-learn-first-and-why-7f4cf5618a8e
Java And Python — Which Is Better To Learn First And Why
March 18, 2019 - Java and Python are two of the most popular programming languages as of 2019. Both are very powerful. However, these two languages are very different. Thus, most beginners and newbies get confused when it comes to making the choice between these two as their first programming language. ... In this post, I will discuss which programming language is better to learn first and why.
🌐
Udemy
udemy.com › development
Python for Beginners - Go from Java to Python in 100 Steps
May 4, 2023 - You will Acquire ALL the Python Skills needed to TRANSITION into Analytics, Machine Learning and Data Science Roles · You will Acquire ALL the SKILLS to demonstrate an EXPERTISE with Python Programming in Your Job Interviews · You will USE ...
Rating: 4.6 ​ - ​ 2.37K votes
🌐
Real Python
realpython.com › java-vs-python
Java vs Python: Basic Python for Java Developers – Real Python
August 16, 2024 - Are you an experienced Java developer who wants to know more about Python? In this tutorial, you'll compare Java vs Python and get to know the similarities and differences between the languages. You'll also learn how to figure out when Python is a good choice for your specific use cases.
🌐
Blogger
javarevisited.blogspot.com › 2018 › 06 › java-vs-python-which-programming-language-to-learn-first.html
Java vs Python - Which Programming Language beginners should learn in 2025?
N.B. I am a Java developer with 7.5 years of experience and had been introduced to Python only a month or two ago but I am liking Python. ... Anonymous said... So you have learnt Python using 2.x. Then comes 3.x and breaks many things. So you have to learn again. What a great language Python is! ... Anonymous said... After 10 years of C++, I've been doing almost exclusively python for 3 years, and I started to learn java today.
🌐
DEV Community
dev.to › alli › what-happened-when-i-learned-java-and-python-at-the-same-time-1haa
What Happened When I Learned Java and Python at the Same Time - DEV Community
August 13, 2019 - If you like Python, it's hard to let it go. It also changed career course, for me personally. BTW having a Java codebase at your disposal at work should help learning Java with a combination of formal reading and tinkering :D · Zed has you type out a lot of code from the book, which seems silly but it helped me get used to the syntax. Yeah, even if it's just a tutorial, typing code can help. After ...
🌐
Medium
medium.com › @d3xvn › the-beginners-dilemma-should-i-learn-java-or-python-7efed89dc5b1
The beginner’s dilemma: Should I learn Java or Python? | by Deven Joshi | Medium
November 20, 2018 - If you plan to pursue computer science/engineering, I would recommend Java first because it helps you understand the inner workings of programming as well. Doing python after Java would help you understand how it makes things easier.