marvin7

marvin7

  • NA
  • 142
  • 0

BONUS QUESTION!

Oct 31 2003 12:48 PM
GIVEN THE FOLLOWING CODE, WHAT IS PRINTED OUT IF YOU TRY TO COMPILE AND RUN? ----------- public class Dummy { Dummy(int x) { this.x = x; } public static void Main() { Dummy x = new Dummy(15); x.X(x); System.Console.WriteLine( x ); } public void X( Dummy y ) { Dummy z = y; z = new Dummy(13); y = new Dummy(17); } int x; } ---------------------- A. Dummy B. 15 C. 17 D. *None of the above*

Answers (8)