This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.knoldus; | |
import org.apache.commons.collections4.CollectionUtils; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
public class LambdaEx { | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.collections4.CollectionUtils; | |
import org.apache.commons.lang3.ObjectUtils; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
public class ObjectUtilsEx { | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.knoldus; | |
import java.util.stream.Stream; | |
public class CurrentAllProcess { | |
public static void main(String[] args) throws Exception { | |
final Stream<ProcessHandle> currentProcesses = ProcessHandle.allProcesses(); | |
currentProcesses.filter(ProcessHandle::isAlive).forEach(processHandle -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.knoldus; | |
import java.util.Optional; | |
public class DestroyProcess { | |
public static void main(String[] args) { | |
final Optional<ProcessHandle> processHandle = ProcessHandle.of(9767); | |
if(processHandle.isPresent()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.journaldev.sparkdemo; | |
...imports... | |
public class WordCounter { | |
private static void wordCount(String fileName) { | |
... | |
} |
OlderNewer