javafx checklistree output: the term inter comma -


for (checkboxtreeitem<string> treeitem : treeitems) {      if (treeitem.isselected()) {          if (treeitem.getvalue() != null) {              konular = konular + treeitem.getvalue();          }               }          }  system.out.println(konular); 

hi, code checktreeviews ,treelist sample1 sample2...

i have choice, output: nullsample3sample4

i want: sample3, sample4

the java 8 way:

string konular = treeitems     .stream()     .map(treeitem::getvalue)     .filter(value -> value != null)     .collect(collectors.joining(", ")); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -