

Ask HN: How much Java do you need to know to write Android apps? - akulbe

My goal is to develop mobile apps, starting with Android.<p>My background is only perl&#x2F;bash&#x2F;SQL - just scripting.<p>I know you need to know Java to do Android, but my question is... how much? I&#x27;m going through a Deitel &quot;Java - How to Program, 9th ed.&quot; book. I&#x27;m wondering how much of this is relevant to Android.<p>Should I be starting from the Android tutorials and working backwards first? In other words, learn things from the Android side, and when something explicitly Java-related is required... go back and fill in the holes?<p>I&#x27;m trying to figure out the most efficient way to get proficient... but do it <i>right</i>. I&#x27;d like to establish good programming habits, from the start.<p>Thank you for your time!
======
jervisfm
For an overview of Java, the book resource you cited (Deitel Java - How to
Program), is an excellent source. I would suggest that you use it to
familiarize yourself with the very basics of Java.

You don't have to go through the entire book cover to cover, but enough of it
that you are at least familiar with basic java concepts and syntax. With that,
proceed immediately to Android specific programming.

I had suggested some resources for starting out with Android development which
you may want to look at:
[https://news.ycombinator.com/item?id=7016067](https://news.ycombinator.com/item?id=7016067)

------
raiph
In summary I would recommend you don't worry about being right from the start.
Spend a little time (like you are with this HN post) to find out enough to
pick at least two very different quick routes for developing at least two very
different simple apps. Then come back to HN to discuss your experience and at
that point you have a decent chance of picking a right path.

Some further food for thought:

> I know you need to know Java to do Android

There are several languages and tools that codegen to the JVM, and more
specifically, Dalvik, the special version of the JVM used for Android, so you
don't _have_ to learn Java per se.

For example, there's Clojure, a flavor of lisp that targets the JVM and
supports Android/Dalvik.

> My goal is to develop mobile apps, starting with Android.

There's already at least one non-Java language/tool I know of that not only
codegens to Android but also iOS and other platforms. So you can write code
once and just push a button to have it run on Android, push another and it
runs on iOS. I'm not going to mention the language/tool because it's
controversial (eg it's not open source), but I'd be surprised if there aren't
open source equivalents either already in existence or set to arrive soonish.

> My background is only perl/bash/SQL - just scripting.

The "Are We There Yet?" Perl 6 codegens to multiple platforms including the
JVM. Unfortunately a key piece of their current codegen strategy doesn't work
with Dalvik so I'd say Android's probably out for Perl 6 for at least a year
or ten.

------
ragatskynet
The answer: as much as you can learn. But actually, to start, a basic skillset
is enough. I would say that you should start with Java first then you can
learn the Android stuff. Thinking in Java is the book I always recommend (by
Bruce Eckel); Android has a good tutorial on Google's Android site, I think
that is good for beginners. I have not read any books on Android but I am sure
there are some good books on advanced topics if you are familiar with the
basics. Start with some easy, small thing then you will learn the pieces with
time.

------
arisAlexis
I would try to program first something in Java like a small project (without
gui) that uses some libraries and has an OOP design. Just experiment with
classes, structures and maybe access a database. Then when you know what
interfaces, subclasses etc are , migrate and take a course on android
development from a MOOC such as udacity or coursera.

Then build an awesome app :)

------
brad0
I'd suggest learning Android straight up. Java Android is a crippled version
of Java IMO. If you want to learn Java specifically learn up to generics.
That's all you really need. You can make things quickly using base Android
without knowing much about Java.

------
weixiyen
You don't need to know much Java is you are starting out. If you are familiar
with OOP, that's really all you need.

~~~
akulbe
I don't know much OOP... as everything I've done up to this point, is very
procedural. (bash, perl)

