Why is getAppProperty () not a static method?

getAppProperty (String key) is an instance method in the MIDlet class. Since the entire midlet in the midlet set has the same manifest / jad file, so why is it not a static method?

+3
source share
2 answers

If the phone runs multiple MIDlet packets inside the same JVM process, they all have the same MIDlet object.

If you then make the method static, it will not know which JAD file will receive the information.

Neither the CLDC nor the MIDP specifications allow phone manufacturers to run multiple MIDlet suites within the same JVM process. This is actually more efficient for a resource-constrained environment.

+3
source

Is this the most pressing issue you ask about J2me? J2me is old dirty and most APIs suck.

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

Moreover, I do not even think that this question answers the full stop.

-1
source

Source: https://habr.com/ru/post/1753867/


All Articles