What is the diff between Variable and Properties ?
Both can have the same capability like read and write. Then why it is different.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pankajkumar PatelRank #181 · 13.4K reputationPosted Sep 11, 2020, 5:14 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Sep 10, 2020, 4:43 AM EDT
Vikas JhaRank #1,222 · 1.5K reputationPosted Sep 10, 2020, 2:24 AM EDT
Ajay GohilRank #2,370 · 599 reputationPosted Sep 10, 2020, 7:26 PM EDT
Property is a member which provides a flexible mechanism to read, write or compute the value of private field just like the Jave objects. Properties can be used as a public data members, but are special methods known as getters and setters.
Basically, if a variable doesn’t have getters and setters it cannot be concluded as property but if it does then it is property/properties.
Aman GuptaRank #193 · 12.4K reputationPosted Sep 10, 2020, 9:17 AM EDT