1.

Which of the following statements is correct about the C#.NET code snippet given below?
 int i; int j = new int(); i = 10; j = 20; String str; str = i.ToString(); str = j.ToString();  

A. This is a perfectly workable code snippet.
B. Since int is a primitive, we cannot use new with it.
C. Since an int is a primitive, we cannot call the method ToString() using it.
D. I will get created on stack, whereas j will get created on heap.
Answer» B. Since int is a primitive, we cannot use new with it.


Discussion

No Comment Found