X

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?

( 5 )  .  1 Rating  .  8 Attempts
16 views   .  0 comments  .   . 

Download Solution PDF
  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.

Give Rating
Report

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

Write Your Comments or Explanations to Help Others
Comments(0)



No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Explore Other Libraries

X




Copyright (c) 2021 TuteeHUB

OPEN APP
Channel Join Group Join