开发者

why getAppProperty() is not static method?

getAppProperty(String key) is instance method in MIDlet class. Since all midlet in m开发者_开发技巧idlet suite share same manifest/jad file, so why cant it be a static method?


If the phone runs several MIDlet suites inside the same JVM process, they all share the same MIDlet Class object.

If you then make the method static, it won't know which JAD file to retrieve information from.

Neither the CLDC nor the MIDP specifications prevent phone manufacturers from running several MIDlet suites inside the same JVM process. It is in fact more efficient to do so in a resource-constrained environment.


This is the most pressing issue you are asking about J2me? J2me is old dirty and most of API's interfaces suck.

On a scale of things that are wrong with J2me static vs instance of getAppProperty are sooo low I don't even think this question deserves an answer.

Further more I don't even think this question is answerable full stop.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜