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

errors are occurred during creation of a class
hi..! friends
if I am trying to save an apex class, I am getting so many asci code errors,
here is my program and related errors:


and my friend saved this program and he did not get any error when he was writing this.but i have got these so many times.
and when i was writing this program, i did not get any error only whenever i am trying to copy any program, i will get these errors :
here is the common error:
'invalid identifier ' public list'.Apex identifiers must start with an ASCII letter (a-z or A-Z) followed by any number of ASCII letters(a-z or A-Z),digits(0-9),'$','_',or unicode characters from U+0080 to U+FFFE-'.
if I am trying to save an apex class, I am getting so many asci code errors,
here is my program and related errors:
and my friend saved this program and he did not get any error when he was writing this.but i have got these so many times.
and when i was writing this program, i did not get any error only whenever i am trying to copy any program, i will get these errors :
here is the common error:
'invalid identifier ' public list'.Apex identifiers must start with an ASCII letter (a-z or A-Z) followed by any number of ASCII letters(a-z or A-Z),digits(0-9),'$','_',or unicode characters from U+0080 to U+FFFE-'.
Some System have different type of identifier
Solution: Don't copy the code type it or replace identifier's like below with your machine identifier
if this was helpful mark as best answer
Thank you
Avaneesh Singh
could u pls post your code here. it will help u to resolve
Regards
vijay
public class DailyLeadProcessorTest {
public static String CRON_EXP = '0 0 0 2 6 ? 2022';
static testmethod void testScheduledJob(){
List<Lead> leads = new List<Lead>();
for(Integer i = 0; i < 200; i++){
Lead lead = new Lead(LastName = 'Test' + i, LeadSource = '', Company = 'Test Company ' + i, Status = 'Open - Not Contacted');
leads.add(lead);
}
insert leads;
Test.startTest();
String jobId = System.schedule('Update LeadSource to DreamForce', CRON_EXP, new DailyLeadProcessor());
Test.stopTest();
}
}