Skip to main content
Question Protected by metadaddy
Tweeted twitter.com/#!/StackSalesforce/status/308389420518756354
deleted 40 characters in body
Source Link
Matt Lacey
  • 25.8k
  • 7
  • 68
  • 153

I want to know about the setter and getter. I know that it is a properties of declaring variable but some time I get confused. Presently I am using a sample of code that is below:

public with sharing class hello
{
       public String temp{set;get;} 
        public hello(){
                 temp = 'first' ;
            }
      
    public String gettemp(){
          return 'second' ;
        }
}

So I want to know that when I use temp on VFP than what value will show on page..... and, what is reason offor that ............... what, and what is the difference of tempbetween temp and gettemp .....gettemp?

Thanks Ashlekh Gera

I want to know about the setter and getter. I know that it is a properties of declaring variable but some time I get confused. Presently I am using a sample of code that is below:

public with sharing class hello
{
       public String temp{set;get;} 
        public hello(){
                 temp = 'first' ;
            }
         public String gettemp(){
          return 'second' ;
        }
}

So I want to know that when I use temp on VFP than what value will show on page..... and what is reason of that ............... what is the difference of temp and gettemp .....

Thanks Ashlekh Gera

I want to know about the setter and getter. I know that it is a properties of declaring variable but some time I get confused. Presently I am using a sample of code that is below:

public with sharing class hello
{
    public String temp{set;get;} 
    public hello(){
        temp = 'first' ;
    }
     
    public String gettemp(){
        return 'second' ;
    }
}

So I want to know that when I use temp on VFP than what value will show on page, what is reason for that, and what is the difference between temp and gettemp?

Thanks Ashlekh Gera

Code formatting
Source Link
eyescream
  • 24.2k
  • 5
  • 59
  • 96

I want to know about the setter and getter. I know that it is a properties of declaring variable but some time I get confused. Presently I am using a sample of code that is below:

public with sharing class hello
{
       public String temp{set;get;} 
        public hello(){
                 temp = 'first' ;
            }
         public String gettemp(){
          return 'second' ;
        }
}

{ public String temp{set;get;} public hello(){ temp = 'first' ; } public String gettemp(){ return 'second' ; } }

So I want to know that when I use temp on VFP than what value will show on page..... and what is reason of that ............... what is the difference of temp and gettemp .....

Thanks Ashlekh Gera

I want to know about the setter and getter. I know that it is a properties of declaring variable but some time I get confused. Presently I am using a sample of code that is below:

public with sharing class hello

{ public String temp{set;get;} public hello(){ temp = 'first' ; } public String gettemp(){ return 'second' ; } }

So I want to know that when I use temp on VFP than what value will show on page..... and what is reason of that ............... what is the difference of temp and gettemp .....

Thanks Ashlekh Gera

I want to know about the setter and getter. I know that it is a properties of declaring variable but some time I get confused. Presently I am using a sample of code that is below:

public with sharing class hello
{
       public String temp{set;get;} 
        public hello(){
                 temp = 'first' ;
            }
         public String gettemp(){
          return 'second' ;
        }
}

So I want to know that when I use temp on VFP than what value will show on page..... and what is reason of that ............... what is the difference of temp and gettemp .....

Thanks Ashlekh Gera

Source Link
D-Horse
  • 2k
  • 3
  • 18
  • 24

getter setter confused

I want to know about the setter and getter. I know that it is a properties of declaring variable but some time I get confused. Presently I am using a sample of code that is below:

public with sharing class hello

{ public String temp{set;get;} public hello(){ temp = 'first' ; } public String gettemp(){ return 'second' ; } }

So I want to know that when I use temp on VFP than what value will show on page..... and what is reason of that ............... what is the difference of temp and gettemp .....

Thanks Ashlekh Gera