Page 63 - IP
P. 63

Day = "Tuesday" ;

                           else if ( code ==3)

                                Day = "Wednesday" ;

                           else if ( code == 4)

                                Day = "Thursday" ;
                           Else

                                Day = "No Match" ;
                           What will be displayed In jTextArea1 after executing the following
                     (c)   statement:                                                                       1

                           jTextAreal.setText("Live\nIn Peace\t and harmony") ;

                     (d)   The following code has some error(s). Rewrite the correct code underlining
                           all the corrections made:                                                        2

                           Int P=3; sum = 0; //Declaring P and sum as Integer

                           {

                                Sum = P;

                                P += 3;

                           }

                           while (P=<12)

                           jTextField1 (Integer.tostring(sum)) ;
               (e)  Given a string object namely 'VALUE', having value as "324" stored in it.

                     What will be result of the following:                                            1

                     JOptionPane.showMessageDialog(null,""+(Value.length()+
                     Integer.parseInt(value))) ;

               (f)   The following code has some error(s). Rewrite the correct code underlining

                     all the corrections made:                                                        2

                     int Total = 0, Jump = 5; int
                     I;

                     for (i = 0, I =<5, i ++)

                     {
                           Jump+=5,

                           Total +=Jump;


                                                              4
   58   59   60   61   62   63   64   65   66   67   68