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
sekhar raj 4sekhar raj 4 

Error Error: Compile Error: unexpected token: '<' at line 39 column 32

public class test1
{
public static Integer st=0;
public static void se()
{
st++;
List<string> sj=new List<string>{'sai','revanthi','kalyan','kamal'};
system.debug('list usage'+sj+'withsize'+sj.size());
sj.add('karthika');
system.debug('addelememt'+sj);
system.debug('arry size of get data' +sj.get(3));
sj.remove(3);
system.debug('deleted elements'+sj+ 'elemets list'+sj.size());
sj.set(3,'sekhar');
system.debug('add one element' +sj +'with size' +sj.size());
sj.add('satya');
system.debug('add one element' +sj +'with size' +sj.size());
sj.sort();
system.debug('all elements'+sj);
List<string> sj1=new List<string>();
sj1.addAll(sj);
system.debug(' adding another list'+sj1);
List<string> sj3=sj1.clone();
system.debug('adding multipul elelments'+sj3);
sj3.clear();
system.debug('elements clear in sj3'+sj3 +'is empty'+sj3.isEmpty());
Integer[] num=new Integer[3];
num[0]=122;
num[1]=222;
num[2]=333;
num.add(444);
system.debug('array list'+num);
//Account acc= new Account();
//acc.Name='tiger';
//insert acc;

 Car_Model__c ss=new Car_Model__c(Name='lepord');
  Insert ss;
list<Cars_Showroom__c> show=new <Cars_Showroom__c>();
Cars_Showroom__c ncc=new Cars_Showroom__c();
ncc.Customer_Name__c='rajarama';
ncc.Car_Model__c=ss.Id;
ncc.Name='kiran';
ncc.Customer_Id__c='78787';
show.add(ncc);

Cars_Showroom__c ncc1=new Cars_Showroom__c(
                          Customer_Name__c='rani',Car_Model__c=ss.Id,
                          Name='raju',Customer_Id__c='88888');
                          show.add(ncc1);

Cars_Showroom__c ncc2=new Cars_Showroom__c(
                          Customer_Name__c='sekhar',Car_Model__c=ss.Id,
                          Name='deevi',Customer_Id__c='99999');
                          show.add(ncc2);
        
Cars_Showroom__c ncc3=new Cars_Showroom__c(
                          Customer_Name__c='rani',Car_Model__c=ss.Id,
                          Name='ranga',);
                          show.add(ncc3);
  if(show !=null && show1.size()>0){
  list<Database.saveResult> savreslt = Database.Insert(show,false);
  for(Database.saveResult rt: savreslt){
  if(rt.issucess()){
  System.debug('Successfully inserted employee. Employee ID: ' + rt.getId());
  }
  else{
  for(Database.Error err : rt.getErrors()) {
   System.debug('The following error has occurred.');
   System.debug(err.getStatusCode() + ': ' + err.getMessage());
   System.debug('Employee fields that affected this error: ' + err.getFields());
                    }
                    }
                    }
              }
       }        
        }