You need to sign in to do that
Don't have an account?
Pavan Kumar 1700
Unexpected Token ";"
public class GetSetDemo
{
Private Integer AccountBalance;
public integer getAccountBalance()
{
Return AccountBalance;
}
public Void setAccountBalance(Integer AccountBalance)
{
this.AccountBalance=new AccountBlance;
}
}
If i am going to save this compiler shows the error like Unexpected token ";"
Why this error how can we acheive this.?
{
Private Integer AccountBalance;
public integer getAccountBalance()
{
Return AccountBalance;
}
public Void setAccountBalance(Integer AccountBalance)
{
this.AccountBalance=new AccountBlance;
}
}
If i am going to save this compiler shows the error like Unexpected token ";"
Why this error how can we acheive this.?
Hi Pavan Kumar,
Please find a solution.I hope it will help you.
All Answers
I think follow codes is wrong: Do you want set AccountBalance as input parameter here, if so please try change this method like this:
Greetings of the day
Thanks for the reply if i used the code, it was rising the error like : Varaible doesnot Exist : AccountBalance"
Hi Pavan Kumar,
Please find a solution.I hope it will help you.
Good Evening!
The Code is working Fine, May i know the difference between " this.AccountBalance= AccountBalance;" and "this.AccountBalance=new AccountBlance;"
Could anyone eloborate the scenario. Thanks in advance.
Thanks & Regards,
Pavan Kumar.