Saturday, November 5, 2022

METHODS 1

 class test

{

 static int max(int x, int y)

 {

 x++;

 if(x>y)

 return x;

 else

 return y;

 }

 public static void main(String args[])

 {

 int a=10,b=15,c;

 c=max(a,b);

 System.out.println(c);

 }

}

No comments:

Post a Comment

CONSTRUCTURE IN PARENT CLASS

class Parent {     public Parent()     {         System.out.println("Parent Constrcutor");     }              } class Child extend...