Page 68 - Trackpad_ipro 4.1_Class8
P. 68

B.  Long answer type questions.

                      1.  List any four features of Java.

                         ...................................................................................................................................................................................

                         ...................................................................................................................................................................................
                      2.  What are logical operators? Write the names of any two logical operators.


                         ...................................................................................................................................................................................
                         ...................................................................................................................................................................................

                      3.  What is the use of unary operators? How many unary operators are there in Java?

                         ...................................................................................................................................................................................

                         ...................................................................................................................................................................................

                  C.  What will be the output of following Java codes?

                      1.  public class rad{
                                                                                   Write output here:
                             public static void main(String[] args){

                                 double r, c;
                                 r=2.3;

                                 c = 2 * 3.14 * r;
                                 System.out.println(c);

                             }
                         }

                      2.  public class A{
                             public static void main(String[] args)

                             {                                                     Write output here:
                                 double s, GST, inv;

                                 s = 200;

                                 GST = 5 * s/100;
                                 inv = s + GST;

                                 System.out.println("GST to be paid:" + GST);
                                 System.out.println("Total invoice value:" + inv);

                             }
                         }

                      3.  public class program{

                             public static void main(String[] args){




                    66     iPro (Ver. 4.1)-VIII
   63   64   65   66   67   68   69   70   71   72   73