• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Help needed with some interview questions

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Posts: 17346
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic