Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2003

    LinkedList and some more questions...


    I just needed to implement a linkedlist in a mobile... how can i do that? i can't find the class... Any other way of doing this??

    Other question is this...What is fastest? Put images on Screen or put pixels on screen? Example put a png of a rectangle on screen or make a fillrect.. ??


  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Cheshire, UK
    You could devise an experiment to time both ways of drawing a filled rectangle and see which is fastest. It may vary from phone to phone. My guess is that fillRect() would be faster (as it only has to write pixel data, whereas drawImage() also has to read it). fillRect() also avoids filling up precious JAR and heap space. Remember that a PNG image in memory takes two bytes per pixel on most Nokia phones, so a 128x128 image will consume 32k of heap space (most Series 40 phones only have 200k heap in total).

    The LinkedList class from the Standard Edition is not part of the MIDP specification. But the standard LinkedList class is not magic; it's just a class written in Java, and there's nothing to stop you from writing your own. A good book on programming algorithms should tell you how linked lists work.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts