Code Example Of Getter And Setter Method
// Apex Controller
public class simplegetset
{
public String userinput{get; set;}
}
<!-- Vf page -->
<apex:page controller="simplegetset">
<apex:form>
<apex:outputlabel value="Enter your name here"/>
<apex:inputtext value="{!userinput}"/>
</apex:form>
</apex:page>