So can I import every Java class and package in Android as I do in Java? How do I know a class or package in Java is also available in Android or not
Asked
Active
Viewed 110 times
1
-
"How do I know a class or package in Java is also available in Android or not": by whether or not Android Studio compiles it. – user207421 Jul 04 '18 at 05:08
-
Is there a way to know beforehand whether or not Android will compile it? Or are there cases where Android fails to compile a class or package imported? – Prince Brucex Jul 04 '18 at 05:14
-
Err, the Android Javadoc? – user207421 Jul 04 '18 at 06:13
1 Answers
-1
So can I import every Java class and package in Android as I do in Java? How do I know a class or package in Java is also available in Android or not
Yes, You can use every package or class of Java based on which version you have specified while creation of Project. You can identify from the package prefix whether it's from JAVA package of Code classes of Android.
There are some classes which Google Developers created based on core java classes in order to achieve some performance improvements specifically for Android which you can differentiate by package name.
Hope it helps.

Bhavesh Patadiya
- 25,740
- 15
- 81
- 107
-
-
Neither `is javax.imageio.*` for example https://stackoverflow.com/questions/5392695/bufferedimage-in-android – leonbloy Aug 10 '19 at 14:02