aspose file tools*
The moose likes Java Micro Edition and the fly likes Help needed with some interview questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Help needed with some interview questions" Watch "Help needed with some interview questions" New topic
Author

Help needed with some interview questions

Mitesh Khapra
Greenhorn

Joined: Oct 25, 2004
Posts: 6
Hi,
I had reecently apperaed for a J2ME interview and here are a few questions which I could not answer. Can anyone help me with the answers.

1. How would you reduce the size of a jar file so that it does not exceed the device specifications.

2. In a J2ME gaming application you have added code for detecting a collision between 2 objects. But while testing you see that the objects have not actually collided but still your code has detected a collision. What could be th epossible reason for this.

3. How do you port a J2ME application on a cell phone.

Any other tips or some interview questions would be really helpful.
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
1) Many discussion on this forum before, do a search
2) Your picture is not full size of the png file.
3) Make the phone specific code in a directory, and shared code in a common directory. Then you can build your jar by using the specific code. Using ant and antenna can automate the process.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

1. Use an Obfuscator.
2. The clossion is based on the square of the sprite rather than the actual visual pixels that make up the sprite image. For example say your sprite is a circle. You can detect collision based on the circle itself, or the bounding box.
3. Depends on whether you have device specific code or not, and sometimes it just takes testing on the other device and fixing the stuff that doesn't work.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
wood burning stoves
 
subject: Help needed with some interview questions