MCQs > IT & Programming > Java ME (Java Platform, Micro Edition) > What will happen on attempting to compile and run the following code?

Java ME (Java Platform, Micro Edition) MCQs

What will happen on attempting to compile and run the following code?
public class ERMidlet extends MIDlet implements CommandListener, Runnable
{
        private Display mDisplay;
        private Form myForm;
        private Command exitCommand;
        private StringItem myString;

        ERMidlet()
        {
                myForm = new Form("Expert Rating Exam");
                exitCommand = new Command("Exit",Command.EXIT, 0);
                myString = new StringItem("15");
                myForm.append(myString);

                myForm.addCommand(exitCommand);
                myForm.setCommandListener(this);

        }

        public void startApp()
        {
                mDisplay = Display.getDisplay(this);
                mDisplay.setCurrent(myForm);
        }

        public void commandAction (Command c, Displayable s)
        {
                destroyApp(false);
                notifyDestroyed();
        }

        public void run()
        {
        }

        public void pauseApp()
        {
        }

        public void destroyApp(boolean unconditional)
        {
        }

Answer

Correct Answer: It will display 15 on the devices screen

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java ME (Java Platform, Micro Edition) Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java ME (Java Platform, Micro Edition) Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it