Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is regular Java the same as the Java for Android [closed]

Tags:

java

android

Is regular Java the same as the Java for Android?

If yes - from where can I download a good java reference?

Looking for something like: Command | small sample | short Explanation

like image 547
Gali Avatar asked Sep 10 '11 11:09

Gali


People also ask

Is Java for Android the same as Java?

What is the difference between Android and Java? Java is a programming language, while Android is a mobile phone platform. Android development is java-based (most of the times), because a large portion of Java libraries is supported in Android.

Which version of Java is used for Android?

Class libraryJava 8 source code that works in latest version of Android, can be made to work in older versions of Android.

Should I still use Java for Android?

Absolutely. Java is still 100% supported by Google for Android development. The majority of Android apps today have some mix of both Java and Kotlin code. Developers can build the same functionality with Java as they can with Kotlin.

Is Java JDK needed for Android Studio?

A copy of the latest OpenJDK comes bundled with Android Studio 2.2 and higher, and this is the JDK version we recommend you use for your Android projects.


1 Answers

Yes it is. The syntax is exactly the same and you can use the same methods that are available in Java SE. Android has its own SDK (Software Development Kit) which is specific Java classes and methods for Android, i.e. dealing with click events and user interface.

However, although Java and Android Java is the same, certain libraries you add for extra functionality may or may not work. I.e. the MySQL Connection library if you try and import that for use with Android it will display an error and your android app will not compile until the MySQL library is removed from the project.

Hope this makes sense to you

like image 95
Boardy Avatar answered Oct 13 '22 02:10

Boardy