Experience Salesforce

Getter, Setter Method Part 2

What You’ll Learn

  • Code Example Of Getter And Setter Method

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>
salesforce-developer
Next Topic

Need Extra Support? Our FREE study materials have got you covered.

Our expert-prepared study materials provide the answers you need. Clear your doubts and improve your skills with detailed notes from industry professionals.

cts-img