Computer Science, asked by yansh19, 1 year ago

specify a class demo to initialise two integer M and n with the value 12 and 9. interchange the value of M and n print the value of M and n before and after interchange?

Answers

Answered by ramadevi24
16
class demo
{
public static void main(String args [])
{
int M=12, n=9, d;
sopln("M="+M);
sopln("n="+n);
d=n;
n=M;
M=d;
sopln("M"+M);
sopln("n="+n);
}}
Similar questions