Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Adam Smallman
318 PointsAndroid Java to Basic Java
Hi guys, I have been working on the Java Basics and the Android Java Videos.
Are there any differences to Java to Android Java? Could what we learn from Ben be used with Craig?
Use The android Java outside of Android? Like in Java based computer programmes?
Thanks guys,
Hope this makes sense.
4 Answers
Christian Andersson
8,712 PointsJava is Java - the language it self does not change from Android to the standard applications.
To make Android apps you use the standard Java languange and syntax with the difference of some new libraries that Android provides - essentially tools which allow you to easily make common things on your phone.
If you are new to programming in general, I would recommend first learning the basics of Java before trying to make an Android app.
But to answer your question -- no, there is no real difference between Java JRE and Java Android other than the fact that you use different "tools" when programming for Android.
Good luck.
Ratul Sarna
Courses Plus Student 11,618 PointsSince we are talking about the same language, all the core features and constructs will be the same for Java SE 7 (Standard Edition) and Java used for Androids. For example, the syntax, the Object Oriented features etc. are exactly same.
The difference lies in the libraries that they offer. Most of the libraries that you would use in Android are not available in Standard Java. Mostly, because you wouldn't require them outside the context of Android development. Like, there would be no Activity, Fragment, Intent classes. But most of the Core Java libraries are available in Android.
Tldr; Learning Java while learning to develop for Android will make you a Standard Java programmer too. This is because you will be well versed with the syntax and would know your way around the language. When you target some specific domain in Java you can easily pick up its libraries and API's in a short amount of time.
Dan Johnson
40,533 PointsThere is no difference. You can apply anything you learned about the language in either series to any Java program. The only thing specific to Android is the API.
I hope this answers your question.
Adam Smallman
318 PointsThats what I thought, I was just kinda thinking of Unity Engine with C# how they have changed a lot of it.
But that is just good to know,
Thanks guys!