- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
A Student class has a property called rollNo and stu is a reference to a Student object and we want the statement stu.RollNo = 28 to fail. Which of the following options will ensure this functionality?

1.Declare rollNo property with both get and set accessors.

2.Declare rollNo property with only set accessor.

3.Declare rollNo property with get, set and normal accessors.

4.Declare rollNo property with only get accessor.

Posted Date:-2021-02-25 10:06:08


More MCQS Questions and answers

Search