Question: Hi, this is a question about Java. On line 24, what does filter(e -> e != null) do, and what does mean by e? Thank

 Hi, this is a question about Java. On line 24, what

Hi, this is a question about Java.

On line 24, what does filter(e -> e != null) do, and what does mean by "e"?

Thank you!

Code File Edit Selection View Go Run Terminal Window Help 93% 8 Thu Jan 6 23:19 6 Word Counter java - JAVA u tinyTable.txt WordCounter.java 3 X II A EXPLO... 04 E O @ - .. DataStructure tinyTable.txt WordCounter.java 3 3 InheritanceAndImp... F Circle.java 3 Sjeve GameObject.java F InheritanceAndimplem... E Missile.java Moveable.java Tank.java 1 Wall.java Adder.java Array.java Ponto ControlFlow.java Friday.java HelloWorld.java PrimitiveDataTypes... 8 Spurce.java Tank.java * DataStructure > Word Counter.java > s WordCounter > main(String() 9 public class WordCounter { Run Debug 10 public static void main(String[] args) throws FileNotFoundException { 11 String() words = new String[50]; 12 Scanner scanner = new Scanner(new File("DataStructure/tinyTable.txt")); 13 int index = 0; 14 while (scanner.hasNextLine) { 15 if (index == words, length) { { 16 String[] newlords - new String[words.length * 2]; 17 System,arraycopy(words, 0, newlords, , words.length); 18 words = newWords; = 19 } 20 words[index++] = scanner.next(); 21 } 22 System.out.println("There are " + index + " words."); 23 Arrays, sort(words, , index); 24 Stream of (words).filter(e > e != null).forEach(System.out::println); e 25 System.out.println("line 24 output"); 26 27 // for (String word, words) { 28 // System.out.println(word); 29 30 // System.out.println("line 27 output"); 31 32 Il for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!