开发者

Is programming for Android completely different from programming for iPhone?

开发者 https://www.devze.com 2022-12-14 15:33 出处:网络
I have made apps for iPhone, but want to also code for the Android but want to know if it is first worth my time, second worth my having to learn another language, and third worth the effort in the se

I have made apps for iPhone, but want to also code for the Android but want to know if it is first worth my time, second worth my having to learn another language, and third worth the effort in the sense that am I going to make a profit from this. Also if in any way Android code is similar, then will it be hard to bring the iOS (Xcode) files, or copy and paste my iOS co开发者_如何学JAVAde into the Android code.


It's a most definite no. As iPhone Guy pointed out, there's a major difference in the languages both platforms require. iPhone uses Objective-C whereas the Android is based on Java (don't know if it's Mobile Edition or "regular" though). In addition, it's a completely different set of APIs. iPhone uses a modified form of Cocoa called Cocoa Touch whereas the Android makes uses of Google's SDK for it. In answer to your question, you won't be able to copy/paste your code between the languages. Your Objective-C code won't compile to Java and vice versa.


Yes -- programming on the iPhone uses Objective-C while programming for Android is in Java. Although they use similar concepts, the two languages are different.

I was a Java programmer before switching to Objective C. Personally I like Objective C better than Java, but that's just a personal opinion ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消