Computer Science, asked by gs8804318, 1 month ago

.
5. Specify a class Demo to initialize two characters 'chi' and 'ch2 with the values Gm
Interchange the values of chl and ch2. Print the values of ch1 and ch2 before and after inte

Answers

Answered by ajb7899
0

Explanation:

public class Demo

{

void main()

{

int ch1 = 15;

int ch2 = 10;

System.out. println("Original values" + ch1 +" "+ch2);

int temp = ch1;

ch1 = ch2;

ch2 = temp;

System.out. println("Interchanged values" + ch1 +" "+ch2);

}

}

Similar questions
Math, 24 days ago