18 Most common used Java List methods
1. add(E element) - Adds the specified element to the end of the list.
2. addAll(Collection<? extends E> c) - Adds all elements of the specified collection to the end of the list.
3. remove(Object o) - Removes the first occurrence of the specified element from the list.
4. remove(int index) - Removes the element at the specified position in the list.
5. get(int index) - Returns the element at the specified position in the list.
6. set(int index, E element) - Replaces the element at the specified position in the list with the specified element.
7. indexOf(Object o) - Returns the index of the first occurrence of the specified element in the list.
8. contains(Object o) - Returns true if the list contains the specified element.
9. size() - Returns the number of elements in the list.
10. isEmpty() - Returns true if the list contains no elements.
11. clear() - Removes all elements from the list.
12. toArray() - Returns an array containing all the elements in the list.
13. subList(int fromIndex, int toIndex) - Returns a view of the portion of the list between the specified fromIndex, inclusive, and toIndex, exclusive.
14. addAll(int index, Collection<? extends E> c) - Inserts all elements of the specified collection into the list, starting at the specified position.
15. iterator() - Returns an iterator over the elements in the list.
16. sort(Comparator<? super E> c) - Sorts the elements of the list according to the specified comparator.
17. replaceAll(UnaryOperator<E> operator) - Replaces each element of the list with the result of applying the given operator.
18. forEach(Consumer<? super E> action) - Performs the given action for each element of the list until all elements have been processed or the action throws an exception.
Share for more: https://t.me/programming_guide
1. add(E element) - Adds the specified element to the end of the list.
2. addAll(Collection<? extends E> c) - Adds all elements of the specified collection to the end of the list.
3. remove(Object o) - Removes the first occurrence of the specified element from the list.
4. remove(int index) - Removes the element at the specified position in the list.
5. get(int index) - Returns the element at the specified position in the list.
6. set(int index, E element) - Replaces the element at the specified position in the list with the specified element.
7. indexOf(Object o) - Returns the index of the first occurrence of the specified element in the list.
8. contains(Object o) - Returns true if the list contains the specified element.
9. size() - Returns the number of elements in the list.
10. isEmpty() - Returns true if the list contains no elements.
11. clear() - Removes all elements from the list.
12. toArray() - Returns an array containing all the elements in the list.
13. subList(int fromIndex, int toIndex) - Returns a view of the portion of the list between the specified fromIndex, inclusive, and toIndex, exclusive.
14. addAll(int index, Collection<? extends E> c) - Inserts all elements of the specified collection into the list, starting at the specified position.
15. iterator() - Returns an iterator over the elements in the list.
16. sort(Comparator<? super E> c) - Sorts the elements of the list according to the specified comparator.
17. replaceAll(UnaryOperator<E> operator) - Replaces each element of the list with the result of applying the given operator.
18. forEach(Consumer<? super E> action) - Performs the given action for each element of the list until all elements have been processed or the action throws an exception.
Share for more: https://t.me/programming_guide
๐4๐1
Java Roadmap
|
|-- Fundamentals
| |-- Basics of Programming
| | |-- Introduction to Java
| | |-- Java Development Kit (JDK) and Java Runtime Environment (JRE)
| | |-- Setting Up Development Environment (IDE: IntelliJ IDEA, Eclipse, etc.)
| |
| |-- Syntax and Structure
| | |-- Basic Syntax
| | |-- Variables and Data Types
| | |-- Operators and Expressions
|
|-- Control Structures
| |-- Conditional Statements
| | |-- If-Else Statements
| | |-- Switch Case
| |
| |-- Loops
| | |-- For Loop
| | |-- While Loop
| | |-- Do-While Loop
| |
| |-- Exception Handling
| | |-- Try-Catch Block
| | |-- Finally Block
| | |-- Throw and Throws Keywords
|
|-- Object-Oriented Programming (OOP)
| |-- Basics of OOP
| | |-- Classes and Objects
| | |-- Methods and Constructors
| |
| |-- Inheritance
| | |-- Single and Multiple Inheritance
| | |-- Method Overriding
| | |-- Super Keyword
| |
| |-- Polymorphism
| | |-- Method Overloading
| | |-- Runtime Polymorphism
| | |-- Dynamic Method Dispatch
| |
| |-- Encapsulation
| | |-- Access Modifiers (Public, Private, Protected)
| | |-- Getters and Setters
| | |-- Data Hiding
| |
| |-- Abstraction
| | |-- Abstract Classes
| | |-- Interfaces
|
|-- Advanced Java
| |-- Collections Framework
| | |-- List (ArrayList, LinkedList)
| | |-- Set (HashSet, TreeSet)
| | |-- Map (HashMap, TreeMap)
| | |-- Queue (PriorityQueue, LinkedList)
| |
| |-- Concurrency
| | |-- Multithreading (Creating Threads, Thread Lifecycle)
| | |-- Synchronization
| | |-- Concurrency Utilities (Executors Framework, Callable and Future, Locks and Semaphores)
|
|-- Java Standard Libraries
| |-- I/O Streams
| | |-- File Handling (File Class, Reading and Writing Files)
| | |-- Streams (Byte Streams, Character Streams, Buffered Streams)
| |
| |-- Networking
| | |-- Sockets (TCP and UDP, Socket and ServerSocket Classes)
| | |-- URL and HTTP (URL Class, HttpURLConnection)
| |
| |-- JDBC
| | |-- Database Connectivity (JDBC Drivers, Connection, Statement, and ResultSet)
| | |-- PreparedStatement and CallableStatement
|
|-- Java Frameworks
| |-- Spring Framework
| | |-- Spring Core (Dependency Injection, Inversion of Control)
| | |-- Spring MVC (Model-View-Controller Architecture)
| | |-- Spring Boot (Creating Spring Boot Applications, Starters and Auto-Configuration, Actuator)
| |
| |-- Hibernate
| | |-- ORM Basics (Introduction to ORM, Configuration and Mapping)
| | |-- Advanced Hibernate (Caching, Transactions and Concurrency, Criteria API)
|
|-- Web Development with Java
| |-- Java EE (Jakarta EE)
| | |-- Servlets (Lifecycle, Handling HTTP Requests and Responses, Session Management)
| | |-- JavaServer Pages (JSP) (Syntax, Directives, JSTL and Custom Tags, Expression Language)
| |
| |-- RESTful Web Services
| | |-- JAX-RS (Creating RESTful Services, Annotations and HTTP Methods, Consuming RESTful Services)
|
|-- Build Tools and Dependency Management
| |-- Maven
| | |-- Project Object Model (POM), Dependencies, Repositories, Build Lifecycle and Plugins
| |
| |-- Gradle
| | |-- Build Scripts, Dependency Management, Task Automation
|
|-- Testing in Java
| |-- Unit Testing
| | |-- JUnit (Annotations, Assertions, Test Suites and Runners)
| |
| |-- Mockito (Creating Mocks and Spies and Verification)
| |
| |-- Integration Testing
| | |-- Spring Test (Testing Spring Components and WebTestClient)
|
|-- Deployment and DevOps
| |-- Containers and Microservices
| | |-- Docker (Dockerfile, Image Creation, Container Management)
| | |-- Kubernetes (Pods, Services, Deployments, Managing Java Applications on Kubernetes)
Free books and courses to learn Java๐๐
https://imp.i115008.net/QOz50M
https://bit.ly/3hbu3Dg
https://imp.i115008.net/Jrjo1R
https://bit.ly/3BSHP5S
https://t.me/Java_Programming_Notes
Join @free4unow_backup for more free courses
ENJOY LEARNING๐๐
|
|-- Fundamentals
| |-- Basics of Programming
| | |-- Introduction to Java
| | |-- Java Development Kit (JDK) and Java Runtime Environment (JRE)
| | |-- Setting Up Development Environment (IDE: IntelliJ IDEA, Eclipse, etc.)
| |
| |-- Syntax and Structure
| | |-- Basic Syntax
| | |-- Variables and Data Types
| | |-- Operators and Expressions
|
|-- Control Structures
| |-- Conditional Statements
| | |-- If-Else Statements
| | |-- Switch Case
| |
| |-- Loops
| | |-- For Loop
| | |-- While Loop
| | |-- Do-While Loop
| |
| |-- Exception Handling
| | |-- Try-Catch Block
| | |-- Finally Block
| | |-- Throw and Throws Keywords
|
|-- Object-Oriented Programming (OOP)
| |-- Basics of OOP
| | |-- Classes and Objects
| | |-- Methods and Constructors
| |
| |-- Inheritance
| | |-- Single and Multiple Inheritance
| | |-- Method Overriding
| | |-- Super Keyword
| |
| |-- Polymorphism
| | |-- Method Overloading
| | |-- Runtime Polymorphism
| | |-- Dynamic Method Dispatch
| |
| |-- Encapsulation
| | |-- Access Modifiers (Public, Private, Protected)
| | |-- Getters and Setters
| | |-- Data Hiding
| |
| |-- Abstraction
| | |-- Abstract Classes
| | |-- Interfaces
|
|-- Advanced Java
| |-- Collections Framework
| | |-- List (ArrayList, LinkedList)
| | |-- Set (HashSet, TreeSet)
| | |-- Map (HashMap, TreeMap)
| | |-- Queue (PriorityQueue, LinkedList)
| |
| |-- Concurrency
| | |-- Multithreading (Creating Threads, Thread Lifecycle)
| | |-- Synchronization
| | |-- Concurrency Utilities (Executors Framework, Callable and Future, Locks and Semaphores)
|
|-- Java Standard Libraries
| |-- I/O Streams
| | |-- File Handling (File Class, Reading and Writing Files)
| | |-- Streams (Byte Streams, Character Streams, Buffered Streams)
| |
| |-- Networking
| | |-- Sockets (TCP and UDP, Socket and ServerSocket Classes)
| | |-- URL and HTTP (URL Class, HttpURLConnection)
| |
| |-- JDBC
| | |-- Database Connectivity (JDBC Drivers, Connection, Statement, and ResultSet)
| | |-- PreparedStatement and CallableStatement
|
|-- Java Frameworks
| |-- Spring Framework
| | |-- Spring Core (Dependency Injection, Inversion of Control)
| | |-- Spring MVC (Model-View-Controller Architecture)
| | |-- Spring Boot (Creating Spring Boot Applications, Starters and Auto-Configuration, Actuator)
| |
| |-- Hibernate
| | |-- ORM Basics (Introduction to ORM, Configuration and Mapping)
| | |-- Advanced Hibernate (Caching, Transactions and Concurrency, Criteria API)
|
|-- Web Development with Java
| |-- Java EE (Jakarta EE)
| | |-- Servlets (Lifecycle, Handling HTTP Requests and Responses, Session Management)
| | |-- JavaServer Pages (JSP) (Syntax, Directives, JSTL and Custom Tags, Expression Language)
| |
| |-- RESTful Web Services
| | |-- JAX-RS (Creating RESTful Services, Annotations and HTTP Methods, Consuming RESTful Services)
|
|-- Build Tools and Dependency Management
| |-- Maven
| | |-- Project Object Model (POM), Dependencies, Repositories, Build Lifecycle and Plugins
| |
| |-- Gradle
| | |-- Build Scripts, Dependency Management, Task Automation
|
|-- Testing in Java
| |-- Unit Testing
| | |-- JUnit (Annotations, Assertions, Test Suites and Runners)
| |
| |-- Mockito (Creating Mocks and Spies and Verification)
| |
| |-- Integration Testing
| | |-- Spring Test (Testing Spring Components and WebTestClient)
|
|-- Deployment and DevOps
| |-- Containers and Microservices
| | |-- Docker (Dockerfile, Image Creation, Container Management)
| | |-- Kubernetes (Pods, Services, Deployments, Managing Java Applications on Kubernetes)
Free books and courses to learn Java๐๐
https://imp.i115008.net/QOz50M
https://bit.ly/3hbu3Dg
https://imp.i115008.net/Jrjo1R
https://bit.ly/3BSHP5S
https://t.me/Java_Programming_Notes
Join @free4unow_backup for more free courses
ENJOY LEARNING๐๐
๐5โค2
๐๐ป๐ณ๐ผ๐๐๐ ๐ญ๐ฌ๐ฌ% ๐๐ฅ๐๐ ๐๐ฒ๐ฟ๐๐ถ๐ณ๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป ๐๐ผ๐๐ฟ๐๐ฒ๐๐
Infosys Springboard is offering a wide range of 100% free courses with certificates to help you upskill and boost your resumeโat no cost.
Whether youโre a student, graduate, or working professional, this platform has something valuable for everyone.
๐๐ข๐ง๐ค ๐:-
https://pdlink.in/4jsHZXf
Enroll For FREE & Get Certified ๐
Infosys Springboard is offering a wide range of 100% free courses with certificates to help you upskill and boost your resumeโat no cost.
Whether youโre a student, graduate, or working professional, this platform has something valuable for everyone.
๐๐ข๐ง๐ค ๐:-
https://pdlink.in/4jsHZXf
Enroll For FREE & Get Certified ๐
๐1
๐ Roadmap to Become a Java Developer ๐ฐ
๐ Programming Basics
โโ๐ Master Java Syntax, Variables & Data Types
โโโ๐ Learn Control Flow, Loops & Exception Handling
โโโโ๐ Practice with Basic Programs
๐ Object-Oriented Programming (OOP)
โโ๐ Understand Classes, Objects & Inheritance
โโโ๐ Dive into Encapsulation, Polymorphism & Abstraction
โโโโ๐ Explore Design Patterns in Java
๐ Tools & Build Systems
โโ๐ Get Comfortable with IDEs (e.g., IntelliJ, Eclipse)
โโโ๐ Master Maven & Gradle for Dependency Management
โโโโ๐ Learn Git & Version Control Systems
๐ Data Structures & Algorithms
โโ๐ Learn Java Collections (Lists, Sets, Maps, etc.)
โโโ๐ Understand Algorithms & Problem Solving
โโโโ๐ Tackle Coding Challenges
๐ Web Development & APIs
โโ๐ Learn Servlets & JSP Basics
โโโ๐ Dive into Spring Boot & RESTful Services
โโโโ๐ Understand Microservices Architecture
๐ Database & Persistence
โโ๐ Master JDBC & SQL Fundamentals
โโโ๐ Explore ORM Tools like Hibernate & JPA
โโโโ๐ Practice with Real-World Data
๐ Testing & Debugging
โโ๐ Get Started with JUnit & Test-Driven Development
โโโ๐ Learn Debugging Techniques & Best Practices
โโโโ๐ Automate Testing with Tools
๐ Advanced Topics
โโ๐ Learn Multithreading & Concurrency
โโโ๐ Understand JVM Internals & Garbage Collection
โโโโ๐ Explore Performance Optimization
๐ Projects & Real-World Applications
โโ๐ Build End-to-End Java Applications
โโโ๐ Contribute to Open-Source Projects
โโโโ๐ Showcase on GitHub & Portfolio
๐ Interview Preparation & Job Hunting
โโ๐ Solve Java Coding Challenges
โโโ๐ Master System Design & Architecture Concepts
โโโโ๐ Network & Apply for Java Roles
โ ๏ธ Get Hired
React "โค๏ธ" for More ๐จโ๐ป
๐ Programming Basics
โโ๐ Master Java Syntax, Variables & Data Types
โโโ๐ Learn Control Flow, Loops & Exception Handling
โโโโ๐ Practice with Basic Programs
๐ Object-Oriented Programming (OOP)
โโ๐ Understand Classes, Objects & Inheritance
โโโ๐ Dive into Encapsulation, Polymorphism & Abstraction
โโโโ๐ Explore Design Patterns in Java
๐ Tools & Build Systems
โโ๐ Get Comfortable with IDEs (e.g., IntelliJ, Eclipse)
โโโ๐ Master Maven & Gradle for Dependency Management
โโโโ๐ Learn Git & Version Control Systems
๐ Data Structures & Algorithms
โโ๐ Learn Java Collections (Lists, Sets, Maps, etc.)
โโโ๐ Understand Algorithms & Problem Solving
โโโโ๐ Tackle Coding Challenges
๐ Web Development & APIs
โโ๐ Learn Servlets & JSP Basics
โโโ๐ Dive into Spring Boot & RESTful Services
โโโโ๐ Understand Microservices Architecture
๐ Database & Persistence
โโ๐ Master JDBC & SQL Fundamentals
โโโ๐ Explore ORM Tools like Hibernate & JPA
โโโโ๐ Practice with Real-World Data
๐ Testing & Debugging
โโ๐ Get Started with JUnit & Test-Driven Development
โโโ๐ Learn Debugging Techniques & Best Practices
โโโโ๐ Automate Testing with Tools
๐ Advanced Topics
โโ๐ Learn Multithreading & Concurrency
โโโ๐ Understand JVM Internals & Garbage Collection
โโโโ๐ Explore Performance Optimization
๐ Projects & Real-World Applications
โโ๐ Build End-to-End Java Applications
โโโ๐ Contribute to Open-Source Projects
โโโโ๐ Showcase on GitHub & Portfolio
๐ Interview Preparation & Job Hunting
โโ๐ Solve Java Coding Challenges
โโโ๐ Master System Design & Architecture Concepts
โโโโ๐ Network & Apply for Java Roles
โ ๏ธ Get Hired
React "โค๏ธ" for More ๐จโ๐ป
๐4โค2
Six Steps to Defining a Function
1. What should your function do? Type a couple of example calls.
2. Pick a meaningful name (often a verb or verb phrase): What is a short answer to "What does
your function do"?
3. Decide how many parameters the function takes and any return values
4. Describe what your function does and any parameters and return values in the docstring
5. Write the body of the function
6. Test your function. Think about edge cases.
1. What should your function do? Type a couple of example calls.
2. Pick a meaningful name (often a verb or verb phrase): What is a short answer to "What does
your function do"?
3. Decide how many parameters the function takes and any return values
4. Describe what your function does and any parameters and return values in the docstring
5. Write the body of the function
6. Test your function. Think about edge cases.
๐4
๐ฐ ๐๐ฅ๐๐ ๐๐ฒ๐๐ ๐ฅ๐ฒ๐๐ผ๐๐ฟ๐ฐ๐ฒ๐ ๐ง๐ผ ๐๐ฒ๐ฎ๐ฟ๐ป ๐๐ฎ๐๐ฎ ๐๐ฎ๐๐ถ๐น๐ ๐
Level up your Java skills without getting overwhelmed
All of them are absolutely free, designed by experienced educators and top tech creators
๐๐ข๐ง๐ค ๐:-
https://pdlink.in/3RvvP49
Enroll For FREE & Get Certified ๐
Level up your Java skills without getting overwhelmed
All of them are absolutely free, designed by experienced educators and top tech creators
๐๐ข๐ง๐ค ๐:-
https://pdlink.in/3RvvP49
Enroll For FREE & Get Certified ๐
๐5
๐3๐ฅ3
๐4๐ฅ4โค1