You need to sign in to do that
Don't have an account?
Charles McDowell
Expecting a semi-colon found <eof>
I am new to salesforce and I wrote a class and I keep getting the error: Expecting a semi-colon found <eof>. Can anyone tell me what the problem is.
public class FileSetup {
static List<Category__c> cat = new List<Category__c>();
Public FileSetup(){
cat = [Select ID, Category__c from category__c];
}
static void runSetup(){
FileSetup obj = new FileSetup() ;
for(Category__c c : filesetup.cat){
system.debug(c.id);
}
}
}
public class FileSetup {
static List<Category__c> cat = new List<Category__c>();
Public FileSetup(){
cat = [Select ID, Category__c from category__c];
}
static void runSetup(){
FileSetup obj = new FileSetup() ;
for(Category__c c : filesetup.cat){
system.debug(c.id);
}
}
}
Try saving again (?)
If there are others developers using your same sandbox the console will show the error for everyone, not just for you.
On the first column it says the name of the class which is giving the error.
Let's see if that helps