What should be the output ?

dhirenkaunar-15094
Posted by dhirenkaunar-15094 under C# category on | Points: 40 | Views : 1060
using System;
class Program {
static void Main(string[] args)
{
Program ex = new Program();
ex.setData(10, 20);
ex.getData();
Console.Read();
}
int i;
int j;
public void setData(int i, int j)
{
i = i; j = j;
}
public void getData()
{
Console.WriteLine("i=" + i + " , j=" + j);
}
}

Result : i=0 , j=0

Comments or Responses

Login to post response