class Swapper
{
int a=23, b=32, temp;
void before()
{
System.out.println("The values of a and b Before swapping are");
System.out.println("A="+a+"B="+b);
}
void swapping()
{
temp=a;
a=b;
b=temp;
}
void after()
{
System.out.println("The values of a and b After swapping are");
System.out.println("A="+a+"B="+b);
}
}
class Swapp
{
public static void main(String [] arg)
{
Swapper s1= new Swapper();
s1.before();
s1.swapping();
s1.after();
}
}
{
int a=23, b=32, temp;
void before()
{
System.out.println("The values of a and b Before swapping are");
System.out.println("A="+a+"B="+b);
}
void swapping()
{
temp=a;
a=b;
b=temp;
}
void after()
{
System.out.println("The values of a and b After swapping are");
System.out.println("A="+a+"B="+b);
}
}
class Swapp
{
public static void main(String [] arg)
{
Swapper s1= new Swapper();
s1.before();
s1.swapping();
s1.after();
}
}