Learn Java from Python background

Viewed 18413

I have been programming in Python for a while now, and I'd like to learn a more "hireable" language like Java or the C/C++/C# family. I'm acquainted with (though not necessarily good at) all of them. I'm leaning towards Java because it runs just about everywhere, and I'd like to start developing for the Android.

Coming from a dynamic language, what is the best way for me to learn Java? Or should I learn a C based language instead?

9 Answers

I would take a project you've implemented in Python and try converting it to Java. Since you already know basic programming fundamentals, it'll probably be easier if you take things you know how to do and figure out how you'd do the same sort of operations in Java (or whatever new language you want to learn).

In the end, the only way to learn to write code, is to write more code.

Java and C# will be less of a step away from Python than would C or C++ because Java, C#, and Python all have automatic memory management. A good Java book is Thinking in Java by Bruce Eckel. It starts at an introductory level, but also has a lot of depth.

The big difference with the language coming from Python is the fact that all variables are typed. The other hard thing with Java has to do with the bewildering array of Java APIs out there. The fact that you are interested in Android is an advantage here. After becoming comfortable with the core language, I suggest you start learning the Android API and focus on becoming an Android expert. I think Android will be a growing market for a while.

Good luck!

The best way to learn is to just start programming. Pick a project like Chess or Checkers and start writing code. Get a book like Java How to Program, go through the examples and exercises and oh yeah....keep writing code! Don't let your background in any other programming language pollute or bias your approach to learning the new language.

I don't think you should use a special way to learn Java because you know Python. Just start with HelloWorld.java and move on step by step. Your basic skills in programming will help you.

1) It depends what you would do with an "hireable" language. For instance, if you were interested in programming web applications and distributed/client/server app, Java would be a good choice.

C# is maybe a bit less client / server oriented, and maybe more valuable for small non IT companies and for most retail software companies.

C and C++ are still great languages, but are more "system", embeded and "critical apps" oriented. And they are not suitable to be runned on differents mobile phones.

2) The best way to learn java, according to me, is firstable to learn the basics, then look for more specialized stuff like J2ME and Android software framework.

I suppose one could ease his/her way into .NET and Java by starting with IronPython and Jython respectively. This will not teach you the new language syntax but open up respective libraries so you can explore what is "out there", learn development tools, build process etc. Syntax is by far the easiest to switch but the know-how and best practices in each language are not.

Related