I do not understand how the get;set; and get(); flow together. I am trying to gather values from a url. I keep getting the Compile Error: Unexpected Token: '='. Furthermore, how would I even test the get;set;? I am lost.
public class tablestagingfieldsController {
public ApexPages.StandardController controller;
public tablestagingfieldsController(ApexPages.StandardController controller) {
this.controller = controller;
}
public table_staging__c i{get;set;}
i.name = ApexPages.currentPage().getParameters().get('name');
i.Reservation__c = ApexPages.currentPage().getParameters().get('resid');
public PageReference saveanddirect() {
PageReference a = new PageReference('google.com');
a.setRedirect(true);
return a;
}}