Activity Forums Salesforce® Discussions What is the use of clear() in Salesforce?

  • Shweta

    Member
    May 21, 2020 at 2:39 pm

    clear() is used to removes all elements from a list, consequently setting the list's length to zero

  • Kirandeep

    Member
    May 22, 2020 at 1:15 pm

    Clear is predefined method of List class which removes all elements from a list.

  • Ayush

    Member
    May 26, 2020 at 7:51 am

    used to remove all of the elements from the List container. This method does not deleted the List container, instead it justs removes all of the elements from the List.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos