Which of the following statements is true about below given code?
public class Test
public int x = 90;
public readonly int z=80;
public int y = z;
public readonly int p = x;
p=x; is not possible
y=z; is not possible
Statements 1 and 2 are correct.
Code will be compiled successfully.
p=x; is not possible and y=z; if you observer carefully these are copying statements ( we are trying to copy data from one variable into another variable ) which must be done in a method.
Back To Top