- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the lambda expression to convert array/List of String to array/List of Integers in java?
You can convert an array list of strings to an array list of integers as:
Example
import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; public class LamdaExpressions { public static void main(String args[]) { ArrayList <String> list = new ArrayList<String>(); list.add("123"); list.add("223"); list.add("323"); list.add("334"); List<Integer> listInteger = list.stream().map(s -> Integer.parseInt(s)).collect(Collectors.toList()); System.out.println(listInteger); } }
Output
[123, 223, 323, 334]
- Related Articles
- Convert list of numerical string to list of Integers in Python
- How to convert string to array of integers in java?
- convert list to array in java
- Program to convert Array to List in Java
- How to convert Integer array list to integer array in Java?
- How to convert Integer array list to float array in Java?
- How to convert Float array list to float array in Java?
- How to convert Long array list to long array in Java?
- Program to convert List of Integer to List of String in Java
- Program to convert List of String to List of Integer in Java
- How to convert a list to array in Java?
- Convert list of string to list of list in Python
- Convert List of Characters to String in Java
- Convert array to generic list with Java Reflections
- Can we convert a Java array to list?

Advertisements