Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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;
   }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #static #setter #getter #examples #java
ADD COMMENT
Topic
Name
2+9 =