Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

list of longs to comma separeated string java

List<Long> longList = new ArrayList<Long>(Arrays.asList(1L, 2L, 3L));
		
		System.out.println(longList.stream().map(String::valueOf)
		        .collect(Collectors.joining(",")));
//Output ->  1,2,3
Comment

PREVIOUS NEXT
Code Example
Java :: javafx live date and time 
Java :: find number of days between two local dates in java 8 
Java :: coding fill method java 
Java :: java getdeclaredfield private field 
Java :: display default value of auto commit java 
Java :: java string format .2f 
Java :: spring boot post request response empty body 
Java :: How to generate all possible k combinations of numbers between 1 and n, in Java? 
Java :: vector inline java 
Java :: taking date as input in java 
Java :: java dictionary 
Java :: How to execute Shell Commands with Java and print the output directly while executing the command 
Java :: foreach not applicable to type - binary tree sort 
Java :: How to efficiently find a target element in a sorted matrix of distinct ints, in Java? 
Java :: org.sonar.java.AnalysisException: Please provide compiled classes of your project with sonar.java.binaries property 
Java :: youTubeInitializationResult gives SERVICE_MISSING error in android 
Java :: spring jpa tree structure 
Java :: open a new activity on click of a button 
Java :: how to use ? in java without using if 
Java :: java socket get ip address of client 
Java :: Traversing a double dimensional array 
Java :: java actionlistener 
Java :: sum of array recursion java 
Java :: primefaces datepicker validation 
Java :: inputing number in java 
Java :: jackson create object node from string 
Java :: java get current date 
Java :: How to create a disjoint-set data structure, in Java? 
Java :: how to get only current date in java android studio 
Java :: simple java program 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =