Skip to main content
Need help on Create a method for inserting accounts.

 

PSB my code

 

---------

 

public class AccountHandler{

 

    Public static Account insertNewAccount(String Name,String Rating){

 

        

 

        Account acc= new account();

 

        acc.Name = Name;

 

        acc.Rating= Rating;

 

        try{ 

 

        insert acc;

 

        }

 

        catch(Exception e){

 

           return null;

 

            

 

        }

 

        return acc;

 

}

 

}

 

-----------------

 

I don't see any error but while checking the challenge it show above error.
6 respuestas
  1. 25 nov 2025, 7:12

    have the same problem even with the same answer