Suggestions for J2ME beginners [ZT]

xiaoxiao2021-03-06  22

In recent days, there are many friends who begin school J2ME asked me what should be paid attention to when J2ME, I think about it, give everyone a few suggestions:

1. First, you must basically understand the object-oriented programming method, which has a certain understanding of classes and methods, especially inheritance, derived, polymorphism, etc., this is the most fundamental basis.

2. It is best to have a J2ME development reference manual in hand. There is a detailed introduction of all internal classes of J2ME. J2ME can be done, which is basically your understanding and application of internal classes. For beginners, java.lang. *, Javax.microedition.lcdui. *, Javax.mijcroedition.midlet. * Is the first package that must be mastered, there must be enough for the basic usage of this package. To understanding. J2ME's game programming is in my opinion that a master MIDlet class plus a number of Canvas classes plus other auxiliary classes (including their own defined classes).

3. Use someone else's code, but don't look too much code, don't look at very complex code (more than 3000 lines of code), because you are not familiar with object-oriented programming, you will see a lot Class, and some class of code exceeds a few thousand lines, will only make you fog, the guidance will not be too much. When studying, I added my own comment for the code, only this really means that you understand these code.

4. In the process of learning, you have to do something yourself. I have complained that I don't know what projects to train. In fact, I don't have to exercise and don't have to have a very complete project, you can start from some of the most basic game modules. Exercise, for example, how to display a picture or multiple pictures on the screen, how to implement the overlap and movement of these pictures (manually controlling movement or automatic movement), how to call up a form when displaying pictures to display some information, Then you can switch back to the picture, although these small exercises can not form a complete game, but he is the foundation of the game, so beginners must not take a big project to do it, so I will only let you Always doing, not, you have to start with a small man, every master is coming, like we have a far away from the master, only you can accumulate your experience from these points of exercises.

5. Optimization of the program, the algorithm design These are not something that beginners should go to study. These are things that you have to consider after you have been able to complete a complete small game independently. The program's optimization is not the three words. The optimized data and methods are the conclusions they have before they have made countless experiments. They are very precious. As for algorithms, set up calculations in J2ME, which is more tired than in C , because of your design algorithm At least to ensure that it is not dead on the phone (this is why the traditional A * algorithm is basically not able to transplant the reason directly to the phone).

6. Many people communicate with others. In the process of communication, you will get more experience, in fact, even the programmers with high levels will also have their own unique insights in some ways, this will teach you a lot of things. .

转载请注明原文地址:https://www.9cbs.com/read-42954.html

New Post(0)