Page 69 - iPro_trackGPT_V5_Class8
P. 69

4.  Explain the features of OOPs.

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

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

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

                 C.  What will be the output of the following Java codes?
                     1.  public class JavaWorld
                                                                                 Write output here:
                        {
                        public static void main(String[] args)

                        {
                        System.out.println("Welcome to the
                        World of");

                        System.out.println("JAVA");
                        }

                        }

                     2.  public class calculator
                        {                                                        Write output here:

                        public static void main(String[] args)
                        {

                        int a = 8;
                        int b = 4;

                        int sum = a + b;

                        int difference = a - b;
                        int product = a * b;

                        int quotient = a / b;
                        int remainder = a%b;

                        System.out.println("Sum: " + sum);
                        System.out.println("Difference:  " + difference);  System.out.
                        println("Product: " + product);

                        System.out.println("Quotient: " + quotient);

                        System.out.println("Remainder: " + remainder);
                        }

                        }





                                                                                              Program Coding     67
   64   65   66   67   68   69   70   71   72   73   74