function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Neo Downes 12Neo Downes 12 

I am getting an error 'The content of element 'ApexClass' is not complete' when using Force.com to create a class (on the Sfdc training - Introduction to Apex for non developers).

I am using an existing developer org(could this be an issue?). I am not using the exercise lab files as I don't have access to them (so maybe missing something). The code is:
public class BankAcc {
    private integer balance=0;
    public string acctName;
    public void makeDeposit(integer deposit); {
                 balance = balance + deposit;
                   }
}
v varaprasadv varaprasad
Hi Neo,

Please use below code. in your code need to remove ; (sit(integer deposit); {)

 
public class BankAcc {
    private integer balance=0;
    public string acctName;
    public void makeDeposit(integer deposit) {
                 balance = balance + deposit;
                   }
}


Hope this helps you!

Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com