Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java and Android how to study them at the same time?

 
Giovanni Montano
Ranch Hand
Posts: 250
4
Android Open BSD Slackware
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hallo
i would like to ask something about studying java and android on the same time, what do you recommend to do

1)knowing what is different and why would help me to stick better the concept in my mind,
i am studying both at the same time and sometimes i make confusion, although i have to recognize that touching base the android concepts is helping me a lot to understand generics, parameters and polymorphism in Java
For instance why Android uses AsyncTask, when a simple thread would have been more easy? knowing the reasons of these things could help me to remember more about android and java

thank you
 
Jeffrey Friesen
Author
Ranch Hand
Posts: 67
5
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Giovanni,

I think it is better to first obtain a good understanding of the Java language and various Java APIs that you are likely to use in your Android apps. For example, you will undoubtedly use various types from the Collections Framework. You will also use StringBuilder/StringBuffer, and likely some networking and stream I/O APIs.

Regarding your comment on AsyncTask, this type's documentation (http://developer.android.com/reference/android/os/AsyncTask.html) mentions that it lets you "perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers." You certainly don't want to delay the UI thread. Think of AsyncTask as Android's equivalent to SwingWorker -- Android doesn't support Swing. For more information, check out StackOverflow's "How can port AsyncTask from Android to java?" topic (http://stackoverflow.com/questions/11815306/how-can-port-asynctask-from-android-to-java).

All the best.

Jeff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic