1.

Which of the following statements are correct about the C#.NET code snippet given below?
 class Sample { static int i; int j; public void proc1() { i = 11; j = 22; } public static void proc2() { i = 1; j = 2; } static Sample() { i = 0; j = 0; } }  

A. I cannot be initialized in proc1().
B. Proc1() can initialize i as well as j.
C. J can be initialized in proc2().
D. The constructor can never be declared as static.
Answer» C. J can be initialized in proc2().


Discussion

No Comment Found