how to create getters and setters for all instance variables code example
Example 1: what is static setter and getter examples in java
public class DataHolder
{
private static String dataString;
public static String getDataString
{
return dataString;
}
public static void setString(String dataString)
{
this.dataString = dataString;
}
}
Example 2: what is static setter and getter examples in java
public class DataHolder
{
public static String dataString;
}