Page 70 - iPro_trackGPT_V5_Class8
P. 70

3.  public class concat

                         {                                                        Write output here:
                         public static void main(String[] args)

                         {

                         String fname = "Eklavya";
                         String lname = "Gupta";

                         String fullname = fname + " " + lname;
                         System.out.println("Full Name: " +fullname);

                         }
                         }

                      4.  public class oper                                       Write output here:

                         {
                         public static void main(String args[])

                         {
                         int a = 10;

                         int b = 8;
                         System.out.println(a-- + --a);

                         System.out.println(b++ + b++);

                         }
                         }
                                                                                   Write output here:
                      5.  public class Swapping
                         {
                         public static void main(String[] args)

                         {
                         int a = 50;

                         int b = 30;
                         System.out.println("Before swapping: a = " + a + ", b = " + b) ;

                         a = a + b;
                         b = a - b;
                         a = a - b;

                         System.out.println("After swapping: a = " + a + ", b = " + b);
                         }

                         }






                    68    TrackGPT iPRO (V5.0)-VIII
   65   66   67   68   69   70   71   72   73   74   75