Java For Android

Java for Android is subtly different to vanilla Java. Learn about the differences and what they mean for your code in this Java for Android article. By Darryl Bayliss.

Leave a rating/review
Save for later
Share
You are currently viewing page 4 of 4 of this article. Click here to view the first page.

Where To Go From Here?

Building an Android app requires time, patience and compiling multiple subjects under one roof. Hopefully this article has shed some light on the inner workings and the tricky relationship between Android and Java.

You’ve had a brief intro into these topics:

  • The Android VM. One of the key ways that Java for Android differs from standard Java is in its compilation process, and its virtual machines.
  • Use of POJOs. Plain old java objects are extensively used within Android to form the basis of model objects.
  • Access Modifiers. These are key to making your code readable and easy to reason about.
  • Interfaces. A hugely important topic in Android, as they are in the wider world of Java. Referring to objects via interfaces rather than concrete class implementations will really help to decouple code and create nicely reusable components.
  • Annotations. The Android-specific Java annotations that you’ll be using right from day 1.

There is no substitute for actually making an app; creating an app and experimenting with some of the concepts demonstrated here, and see what works and what fails.

If you’re new to Java, or want to refresh your memory, you can download a free PDF cheat sheet and quick reference that’ll make writing your first Java much smoother.

The forums, found below, are open to you to discuss this tutorial, ask questions, share ideas and muse on the larger theme of developing with Java for Android. There certainly is a lot to talk about!

The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

Contributors

Over 300 content creators. Join our team.