You need to sign in to do that
Don't have an account?
prasanth puvvada 4
this keyword error, please help
i have a simple apex program and i am trying to execute it from "developer console" i am getting this error. " unexpected token: thisexample at line 11" please help... thanks in advance
public class thisexample {
public integer age=10;
public thisexample(integer age)
{
this.age=age;
System.debug('the value of age is '+age);
}
}
thisexample t1=new thisexample(22);
t1.age;
public class thisexample {
public integer age=10;
public thisexample(integer age)
{
this.age=age;
System.debug('the value of age is '+age);
}
}
thisexample t1=new thisexample(22);
t1.age;
if this is a Class you cant have code after closing parethersis so remove line 11 and 12
All Answers
if this is a Class you cant have code after closing parethersis so remove line 11 and 12