+ 5

Fill in the blanks to define valid get and set accessors for the age member:

class Dog { private int age; public int Age { get { return age; } set { age = value ; } } }

6th Feb 2018, 3:44 PM
Mesut Alcicek
Mesut Alcicek - avatar
3 Answers
+ 1
class Dog { private int age; public Dog( int val) { age = val ; } }
10th Aug 2021, 8:26 AM
Mohansai Kunapareddy
Mohansai Kunapareddy - avatar
+ 1
get, return, value
6th Oct 2022, 8:26 PM
Zeshan Nissar