A field is a variable (that can be of any type) that is defined inside a class. It can be used to define the characteristics of an object or a class. On the other hand, a property is a member of the class that provides an abstraction to set (write) and get (read) the value of a private field.
Interviews1 answer
What is the difference between Variable and Property ? Can you give any example to clarify the same ?
1 Answer
Rajeev KumarPosted Jun 26, 2023, 3:14 AM EDT

