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
pradeep kumar s 1pradeep kumar s 1 

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:
apex class with asci code errorserror

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-'.


 
AvaneeshAvaneesh
Hi

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
" " double cotes
' ' single 
, comma 
. dot
..... etc
 
if this was helpful mark as best answer 

Thank you
Avaneesh Singh
vijayabhaskarareddyvijayabhaskarareddy
Hi @ pradeep

could u pls post your code here. it will help u to resolve 
Regards
vijay
 
Sivakumar LakshmananSivakumar Lakshmanan
@isTest
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();
    }
}
 
Sivakumar LakshmananSivakumar Lakshmanan
Please help me to solve the issue in the code