Added a function to get the Java version to be used by ADB.

Related to https://github.com/appium/appium-adb/pull/65
i don't understand, what's the difference between these two ways of writing it?