Properties in Java are generally understood as get and set methods. A field, usually called a "class member."
A property is limited to the declaration of a method in a class and is not related to other members of the class. For example:
void SetA (String s)
{}
String Geta ()
{}
When you have such a pair of methods in a class, we can say that the class has a read-write a property (note that it is lowercase a). Properties that contain both the get accessor and the set accessor are called Read-write properties (Read-write property). Properties that only have a get accessor are called read-only properties (Read-only property). Properties that only have a set accessor are called write-only properties (Write-only property).
A class Member (field), typically a class member variable defined in a class, for example:
public class A
{
Private String s = "123";
}
We can say that there is a member variable called S in Class A.
1. Fields: class Card{ private string Name;} 2. Properties: The property contains two modules: the set and Get,set modules are responsible for writing the property, and the Get module is responsible for reading the properties. There are a number of other operations that can be done in two modules, such as verifying that the assigned value meets the requirements in set and deciding whether to assign a value. class Card{private string name;Public string Name{get {return this.name;}set {this.name=value;}}}
Fields and properties in Java