More work. A lot more work.
If you're looking for portability and haven't chosen a language to learn yet, use Java. It's primarily used in development for Android and will make your life a whole lot easier when porting it to each OS. Three out of the four you mentioned (Windows, Mac, Android) use Java to develop applications. I can't remember what Apple's attitude to Java for iOS development is.
|
No. Java is bad for portability. You can run it on all major platforms with no modification, yes, but should a platform emerge without Java's VM ported to it or with licensing terms that prevent you from using it (see: iOS) then you're dead in the water. C++ is portable at compile-time. If you don't use anything platform specific except in small wrappers, then you can port to other platforms in a matter of days. However, with Java, you're at the mercy of whatever platforms will allow you to run it. You can compile C and C++ with GCC for all modern platforms and run them in all modern OSes.