Saludos amigos!, Solo uno mismo sabe cuanto sacrificio costó llegar al punto donde estamos hoy!!, mi reto este año fue alcanzar una la ruta de desarrollo web y de esta manera llegue al nivel PRO de @platzi, muchas gracias
#platzi#platzirank#desarrolloweb#javascript#dev#code
Java List Methods Cheatsheet. Which is your favourite?
In Java, you can work with lists using the java.util.List interface, which is implemented by various classes like ArrayList, LinkedList, and others. Here's a list of some of the most common methods you can use with Java lists:
1. Adding Elements:
- add(E e): Adds an element to the end of the list.
- add(int index, E element): Inserts an element at the specified index.
- addAll(Collection<? extends E> c): Adds all elements from a collection to the list.
2. Accessing Elements:
- get(int index): Retrieves the element at the specified index.
- indexOf(Object o): Returns the index of the first occurrence of the specified element.
- lastIndexOf(Object o): Returns the index of the last occurrence of the specified element.
3. Removing Elements:
- remove(int index): Removes the element at the specified index.
- remove(Object o): Removes the first occurrence of the specified element.
- clear(): Removes all elements from the list.
4. Checking Size and Empty:
- size(): Returns the number of elements in the list.
- isEmpty(): Checks if the list is empty.
5. Sublist and Range Operations:
- subList(int fromIndex, int toIndex): Returns a view of the portion of the list between the specified indexes.
- addAll(int index, Collection<? extends E> c): Inserts all elements from a collection into the list at the specified index.
- removeAll(Collection<?> c): Removes all elements that are in the specified collection.
6. Replacing and Setting Elements:
- set(int index, E element): Replaces the element at the specified index with the given element.
7. Iterating through Elements:
- You can use various forms of loops or the enhanced for-loop to iterate through list elements.
8. Sorting and Reversing:
- sort(Comparator<? super E> c): Sorts the elements of the list according to the provided comparator.
- Collections.sort(List<T> list): Sorts the list in natural order.
- Collections.reverse(List<?> list): Reverses the order of elements in the list.
9. Checking for Element Existence:
- contains(Object o): Checks if the list contains the specified element.
- containsAll(Collection<?> c): Checks if the list contains all elements from the specified collection.
10. Array Conversion:
- toArray(): Converts the list to an array.
- toArray(T[] a): Converts the list to an array of the specified type.
These are some of the most common methods for working with Java lists.
The specific methods available may vary depending on the concrete implementation of the List interface you are using (e.g., ArrayList, LinkedList, etc.).
🚨 Join Waiting List for New 10+ Hour Linux Course - https://t.co/EolNQecppN
#systemdesign #coding #interviewtips
@ML_Ayuda@rialre Buenas tardes, ya no se que hacer para ingresar a mi cuenta y no me están respondiendo que pésimo soporte, y no se que pasa con el dinero que tengo en la cuenta, me va tocar poner una queja ante la @sicsuper para ver si me responden?
@ML_Ayuda@rialre Buenos dias quedaron de contestarme hoy, pueden por favor darme una respuesta para saber como puedo ingresar a mi cuenta, tengo cuentas pendientes por atender
@ML_Ayuda Llevo 5 días esperando que me den acceso a mi cuenta, cuento intento validar mi cuenta me dicen que no reconocen que sea mía, me pueden ayudar por favor. Tengo ventas pendientes por enviar y recibir. Gracias
@ML_Ayuda Llevo 5 días esperando que me den acceso a mi cuenta, cuento intento validar mi cuenta me dicen que no reconocen que sea mía, me pueden ayudar por favor. Tengo ventas pendientes por enviar y recibir. Gracias
@ML_Ayuda@rialre Llevo 5 días esperando que me den acceso a mi cuenta, cuento intento validar mi cuenta me dicen que no reconocen que sea mía, me pueden ayudar por favor. Tengo ventas pendientes por enviar y recibir. Gracias