You can use a combination of list methods.

//start context
list<string> lst= new list<string>{'aa','bb','cc','dd'};
string var = 'cc';

//find the index of var
integer index; 
for(integer i =0;i< lst.size();i++){
 if(var==lst[i]) index=i;
}
//may want to throw an exception if index is still null

list<string> tempLst = lst.clone();//backup your collection
lst.clear(); //empty your collection

lst.add(tempLst[index]); //retrieve your desired record and put it on index 0
tempLst.remove(index); //remove your record from the old collection
lst.addAll(tempLst); //add the other data to your list 

system.debug(lst); /// |USER_DEBUG|[22]|DEBUG|(cc, aa, bb, dd)

But, logic like this might imply you should consider exploring the apex map collection type and its methods. Know you can use the map.values() property to still reference it as a list, or can directly iterate over a map in Visualforce too.

Answer from Samuel De Rycke on Stack Exchange
🌐
Salesforce Developers
developer.salesforce.com › docs › atlas.en-us.apexcode.meta › apexcode › langCon_apex_collections_lists.htm
Lists | Apex Developer Guide | Salesforce Developers
A list is an ordered collection of elements that are distinguished by their indices. List elements can be of any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.
Discussions

Maximum Size of List in APEX Salesforce - Stack Overflow
I have created a DataBase.Batchable class in which I am inserting a custom object named Event__c public class BatchCreateGCalendars implements Database.Batchable , Database.Stateful, More on stackoverflow.com
🌐 stackoverflow.com
a tier list for the best characters rn in apex

This guy is trolling.

More on reddit.com
🌐 r/ApexConsole
24
0
August 7, 2020
We Ranked Every Apex Team! | TSM ALGS Tier List

Confirmed : Evan Tripods Fanboy. MFAM

More on reddit.com
🌐 r/CompetitiveApex
85
99
February 20, 2021
Finally, some demotions! Apex Tier List 2022-12-12
Lol Times are certainly changing when Hilda and Wehttam are getting knocked down 🤣 More on reddit.com
🌐 r/langrisser
28
45
October 1, 2022
🌐
Oracle
blogs.oracle.com › apex › beginners-guide-to-list-of-values-in-oracle-apex
Beginners Guide to List of Values in Oracle APEX | apex
June 12, 2025 - This first in a series of blog posts on List of Values examines the different ways you can allow end users to select data from a list of allowed values. Starting with a text column that allows free-form data entry, you will learn different ways to limit what your end users can enter.
🌐
Nebula Consulting
nebulaconsulting.co.uk › home › insights › list processing in apex with map(), filter(), and more
List Processing in Apex with map(), filter(), and more
September 1, 2025 - Bringing filter() and map() to Apex saves us from the boilerplate, and highlights the important stuff. The building block for this technique is the Lazy Iterator class mentioned in a previous post. This class supports filter(), map(), and more. It also does this in an efficient way, so that there are no intermediate lists created while you do your processing.
🌐
Games
games.gg › home › apex legends › apex legends season 28 tier list: best legends ranked
Apex Legends Season 28 Tier List: All Legends Ranked [Guide] | GAMES.GG
5 days ago - Master the Breach meta with our Apex Legends Season 28 tier list. See every legend ranked S to D and find your best pick for ranked. Start winning now.
Find elsewhere
🌐
LinkedIn
linkedin.com › pulse › list-methods-apex-amit-khandelwal
List Methods in APEX
December 22, 2021 - Creating a List; Initializing the list (Creates a new instance of the List class. A list can hold elements of any data type Integer); Adding to Integer values to the list.
🌐
SEARCH
search.org › home › resources › isp list and le guides
ISP List and LE Guides - SEARCH
January 10, 2026 - The ISP List is a database of Internet service and other online content providers that will help you get the information you need for your case. For each Internet Service Provider listed, you’ll find the legal contact information and instructions needed to serve subpoenas, court orders, and ...
🌐
Thales Academy
thalesacademy.org
Thales Academy
We cannot provide a description for this page right now
🌐
APEX EXPO 2026
apexexpo.org
Homepage | APEX EXPO 2026
Exhibit PCB fabricators, designers, OEM’s, EMS companies and more attend and exhibit at APEX EXPO.
🌐
Code With Sally
codewithsally.com › home › blog archive › beginner’s guide to salesforce apex: an introduction to collections – lists, sets, and maps
Beginner’s Guide to Salesforce Apex: An Introduction to Collections - Lists, Sets, and Maps
March 20, 2024 - An Apex List is a collection of multiple items, much like a to-do list where you can add new tasks, remove completed ones, and prioritize the order in which you want to complete them.
🌐
Apex Leadership Co
myapexevent.com
Apex Leadership Co School Fundraiser
If you don't have any Access Codes OR only have 1 student at this school Click here and give us some info and we'll be able to help you. Also, every teacher has a list of access codes at school, let your students know they can reach out to their coaches as well. Go Back · To learn more about Apex, visit apexleadershipco.com ·
🌐
University of California
hs-articulation.ucop.edu › agcourselist
University of California A-G Course List
Find a specific institution's A-G course list. View associated schools within a school district or network. List of online schools with A-G course lists. To search for A-G courses by title or type, use the A-G Course Search.
🌐
Apex Park and Recreation District
apexprd.org › home
Home – Apex Park and Recreation District
June 21, 2022 - Apex PRD has awesome spaces to rent for your group, party, or field rental.
🌐
Apex Legends
apexlegendsstatus.com › live-ranked-leaderboards › Battle_Royale › XBOX
Apex Ranked leaderboard
Apex Legends live Battle Royale ranked XBOX leaderboards, updated every 5 minutes
🌐
S2 Labs
s2-labs.com › home › lists in apex
Lists in Apex | Salesforce Developer Tutorials
August 6, 2025 - Define a List: Start by defining a list. In Apex, lists are dynamic arrays that can hold collections of objects.
Rating: 4.7 ​ - ​ 874 votes
🌐
S2 Labs
s2-labs.com › home › lists initialization in apex
Lists Initialization in APEX | Salesforce Developer Tutorials
August 6, 2025 - The syntax for initializing a list in Apex involves specifying the type of the list and creating a new instance of it.
Rating: 4.6 ​ - ​ 675 votes
🌐
Sfdcmeet
sfdcmeet.com › development › apex-in-salesforce › list-in-apex-collections
List in Apex Collections – Salesforce CRM Online Training and Knowledge Sharing
Hence, List in Apex Collections can be defined as a collection of ordered elements since it is accessed by index and maintains the order of insertion. Also it would accepts duplicates. We have other types of collections as well.