Should I learn Java before learning Android or I can do both things in parallel? What is the best approach?
-
If you go into your old questions, you can "tick" the answer which is most helpful. Some people get disgruntled at those who don't bother doing so. Personally I don't find it anything to get worked up about, but there we go... – Jon Skeet Aug 16 '10 at 18:58
-
3Similar questions: http://stackoverflow.com/questions/2981495/how-much-java-should-i-have-learnt-before-trying-android-programming and http://stackoverflow.com/questions/2915410/is-deep-java-knowledge-needed-for-android – Jesper Aug 16 '10 at 19:01
-
if you're asking whether you can learn android and java in parallel then definitely not , if you're asking whether java is mandatory well while java is kind of lingua-franca for android, you can definitely use some other languages like C#(Xamarin) and C++(Qt) – niceman Jul 30 '15 at 18:38
-
Java is an object oriented language. So if you learn OOP, you'll quickly grasp java: Take the "Master Object Oriented Design" course on http://eliminatecodefear.com - One of the best resources for learning practical object oriented design and development with HW assignments – Horse Voice Feb 08 '16 at 04:30
6 Answers
I would absolutely learn Java first. Don't bother learning things like servlets, Swing etc - but learn:
- The core language
- Collections
- IO
- String handling
Trying to learn these while also learning a completely new environment will make it a lot harder to work out where you're going wrong.
Note that this isn't specific to Android - I'd always encourage developers to learn the "core" of a new platform before learning "peripheral" technologies such as native UIs or web frameworks.
I've seen people try to do this before - literally asking complicated questions about advanced scenarios, while not understanding the basics of the language. Sometimes the problem they've been having has been due to the complex API they were using, and sometimes it's been due to the basic misunderstandings - but the problems looks exactly the same to them. They can't tell the difference between not understanding how method arguments are passed, and having difficulty with cross-threading UI operations. As far as they're concerned, "something has gone wrong." Every step is painful when you don't have a solid foundation.
Aside from anything, as boring as console applications with no interaction might be, they're really great for just testing something quickly. You typically don't need to worry about threading, permissions, graphics, resources etc. Another good way to test your understand is via unit tests. Rather than a normal test-first approach, write a method and predict its output with unit tests, until you run out of interesting situations to test. Once you're done, you've got a complete record of what the code does - keep it for later on, in case you need to revisit the concept you were testing.

- 1,421,763
- 867
- 9,128
- 9,194
-
2Agreed - I am a developer who has already done a lot of programming in C# and Java. It wasn't hard to get in and make code behind work for the first Android app I'm doing. So most of my learning is now going to be UI interaction and phone specific stuff. But without the Java knowledge, I'd be lost. – theJerm Oct 05 '12 at 22:28
-
@JonSkeet and what if I am an expert C# developer, can I dive into android development? – Alex Mar 11 '13 at 09:17
-
@AliIssa: I would still take a little time to experiment with desktop Java first, just to find your feet. Spend a week exploring the language and core APIs that way, *then* start Android. – Jon Skeet Mar 11 '13 at 09:29
-
-
1@SanketDasgupta: Classes, interfaces, fields, methods, constructors, generics... the kinds of things defined in the language specification as opposed to in some API. – Jon Skeet Jun 29 '15 at 14:53
-
Learning is always easier when you have a goals to work towards. If your goal is to do primarily Android programming, focus on that and you'll pick up Java on the way.

- 76,436
- 32
- 213
- 198

- 21,110
- 9
- 55
- 65
-
16And for your next act, you might want to write a book in Chinese. Don't bother learning anything about it first - I'm sure you'll pick it up along the way. Seriously, it's going to be *much* easier to learn Java in an environment which makes it easy to play with, write console apps in etc. When the OP runs into a problem while writing an Android app, it's going to be *really* hard to diagnose what's going on if he doesn't know the language beforehand. – Jon Skeet Aug 16 '10 at 18:58
-
3I thinking comparing learning a specific use of a programming language to writing a book on a spoken langauge is a bit harsh. Last time I checked Android uses Java, so I found it pretty obvious that my meaning was to learn Java and Android at the same time, rather than focus 100% on Java, then turn to Android. – Robert Aug 16 '10 at 19:07
-
@Robert: But learning to platform on a mobile environment (or indeed learning pretty much *any* advanced client UI technology) when you don't know the language is much trickier than learning the core of the language in a simpler environment and then moving on to the harder version of the platform. I would strongly advise *against* trying to learn two significant things at the same time. – Jon Skeet Aug 16 '10 at 19:12
-
Again I wasn't expecting him to dive into Android programming with no knowledge of Java at all, I simply meant that he shouldn't focus on Java and neglect Android. Just my personal opinion and experience in the past as I pick up a language/platform much more quickly with a project to work towards. He did not mention if he had any previous programming experience or not so I based it off my opinion. – Robert Aug 16 '10 at 19:27
-
Well, you said to "focus on Android" - that suggests *precisely* that he should dive into Android with no knowledge of Java. I view the eventual goal of Android as a reason not to bother learning any servlet / Swing stuff... but *not* a reason to skip learning the core of the language first, in as simple a context as possible (e.g. a console app). – Jon Skeet Aug 16 '10 at 19:43
-
3I am unsure of the intent of your comments, is it to provide the OP with valuable information or to attempt to bash me? If the latter, my position remains that my learning style would be to take up both at the same time as I would be curious as to how I would use the Java in tandem with Android. As such, depending on his prior programming knowledge, this approach may work for him as well. – Robert Aug 16 '10 at 19:54
Yes I would learn at least the basics of Java prior to starting on Android.
Starting in Android would be like learning to scuba dive before learning to swim, sure you could probably struggle your way along, but you'll be making the process unnecessarily more difficult for yourself.

- 41
- 2
The tutorial given in the Android Developer Website is hard to understand if you don't know anything about java. I'd recommend starting with Java basics and then go on with Android. It would be the best way to understand everthing in an easier way.
In Java, you'll also have to focus the way to do things efficiently because mobile battery is a matter to take into account in mobile applications.

- 19,387
- 30
- 102
- 135
Java first if you know C# its close enough where you can do it the way you wanted. otherwise, definatly java.
Learn to open a file, deal with user input especially strings, learn all the basic keywords
if your new to dev in general, learn looping, branching, embedding decision making. "your a long way from android in this case i would say" a good book will help a lot more then the free crap youll find online. i went the online route for months and stuggled. grabbed a good book and was moved on the android in 2weeks. if you know where to look, good books are also free ;)

- 21
- 1