File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Help needed with some interview questions" Watch "Help needed with some interview questions" New topic

Help needed with some interview questions

Mitesh Khapra

Joined: Oct 25, 2004
Posts: 6
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

Joined: Feb 05, 2001
Posts: 17276

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.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Help needed with some interview questions
It's not a secret anymore!