• Romeo Sergio
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Apex class:

public class Arrays_Example {
    
    public void Example1(){
        Account[] accounts = new Account[4];
        Account a1 = new Account();
        a1.Name = 'TCS';
        a1.Phone = '1111';
        a1.Rating = 'Hot';
        accounts[0]=a1;
        Account a2 = new Account();
        a2.Name = 'Dell';
        a2.Phone = '2222';
        a2.Rating = 'Warm';
        accounts[1]=a2;
        Account a3 = new Account();
        a3.Name='CapG';
        a3.Phone='3333';
        a3.Rating='Cold';
        accounts[3]=a3;
        for (Integer i = 0; i<accounts.size();i++){
            
            System.debug('Name: '+ accounts[i].Name);
            System.debug('Phone: '+accounts[i].Phone);
            System.debug('Rating: '+ accounts[i].Rating);
        }
    }

}

And Trying to executute with the statement.

Arrays_Example acc = new Arrays_Example();
acc.Example1();

But getting error :

System.NullPointerException: Attempt to de-reference a null object.


There is no error in class while executing getting error. Can someone run the code and help me with the answer. Thanks
 

From unit Developer Beginner > Platform Development Basics > Code With SalesForce Languages...

 

"3. Click Property Map and then click Developer Console".

There is no lightning component present named "Property Map" or any variation of it.