public class AccountUtils {
public static void accountByState(){
List<Account> myAccounts = [SELECT Id, Name FROM Account];
}
}
Why my code doesn't complete the challenge of trailhead? What is wrong?
the requirements are:
Create an Apex class named AccountUtils and include a static method
named accountsByState that accepts a state abbreviation as a string
and returns a List of Account objects The method must return the ID
and name of all Account objects that match the BillingState for the
state abbreviation passed to the method
Best Answer
You are not passing the parameter for state.