nerdexam
GIAC

GSSP-NET · Question #486

George works as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. George creates an application using the .NET Framework. He writes…

The correct answer is B. test=1000; C. FirstClass.test=1000. See the full explanation below for the reasoning.

Question

George works as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. George creates an application using the .NET Framework. He writes the following code snippet in the application:

GIAC GSSP-.NET Exam public class FirstClass { public static int test=500; } public class SecondClass : FirstClass { public static void Main(String[] args) { SecondClass mb=new SecondClass(); mb.MyMethod(); } public void MyMethod() { //Appropriate statement } } George wants to modify the value of the test variable in MyMethod to 1000. Which of the following code segments will he place in MyMethod to accomplish this task? Each correct answer represents a complete solution. Choose all that apply.

Options

  • Abase.test=1000;
  • Btest=1000;
  • CFirstClass.test=1000;
  • Dtest=1000.00;

How the community answered

(43 responses)
  • A
    7% (3)
  • B
    79% (34)
  • D
    14% (6)

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice