You need to sign in to do that
Don't have an account?

Error: Compile Error: expecting right curly bracket, found 'for' at line 4 column 4
Hello All,
public class AccRatingUpdate
{
list<account> acclist=[select id, name , rating from account];
for(account acc: acclist)
{
}
}
kindly help me with the above code and its error
public class AccRatingUpdate
{
list<account> acclist=[select id, name , rating from account];
for(account acc: acclist)
{
}
}
kindly help me with the above code and its error
Mark it as answer if it solves your problem.
All Answers
Mark it as answer if it solves your problem.
So you need to update your code and the logic you need to write must be inside a method.
Thanks,